From owner-freebsd-isp Sun May 9 9:46:55 1999 Delivered-To: freebsd-isp@freebsd.org Received: from backup.af.speednet.com.au (af.speednet.com.au [202.135.206.244]) by hub.freebsd.org (Postfix) with ESMTP id D8CE7157E4 for ; Sun, 9 May 1999 09:46:42 -0700 (PDT) (envelope-from andyf@speednet.com.au) Received: from backup.zippynet.iol.net.au (backup.zippynet.iol.net.au [172.22.2.4]) by backup.af.speednet.com.au (8.9.1/8.9.1) with ESMTP id CAA16033; Mon, 10 May 1999 02:46:36 +1000 (EST) Date: Mon, 10 May 1999 02:46:35 +1000 (EST) From: Andy Farkas X-Sender: andyf@backup.zippynet.iol.net.au To: Edwin Culp Cc: freebsd-isp@FreeBSD.ORG Subject: Re: duplicate file finder In-Reply-To: <3735B2EE.A0D14B2B@MexComUSA.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, 9 May 1999, Edwin Culp wrote: > Andy Farkas wrote: > > > Does anyone know of a proggy that finds duplicate files? > > > > I often use find with a -exec cksum {} ; with pipes to awk, sort and/or > uniq depending on what I really want to do and how large the directory > structure is. Yes, I've managed to put two one-liners together to get what I want: # find . -type f -exec md5 "{}" \; | awk '{printf "%s %s\n", $4, $2}' \ | sort > md5-list # find . -type f -exec md5 "{}" \; | awk '{print $4}' \ | sort | uniq -d | grep -f - md5-list > > ed > > P.S. md5 would also work but is slower. > -- :{ andyf@speednet.com.au Andy Farkas System Administrator Speed Internet Services http://www.speednet.com.au/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message