On Saturday, December 17, Martin =?iso-8859-1?Q?Schr=F6der?= wrote: > On 2005-12-16 17:18:09 -0800, Smith wrote: > > Is there any unix utility or script or OpenBSD port that will find > > duplicate binary files within a directory? > > Google for uniqleaf
To get a list of files (with sums) that are the same (modulo MD5 collisions), listed consecutively: find . -type f | xargs md5 > /tmp/foo cat /tmp/foo | rev | cut -d' ' -f1 | rev | sort | uniq -d > /tmp/bar fgrep -f /tmp/bar /tmp/foo | rev | sort -k 1 | rev To get a count of how many files each such corresponds with (count first, file-sum second): cat /tmp/foo | rev | cut -d' ' -f1 | rev | sort | uniq -c | sort -n --Toby.

