#!/usr/local/bin/perl # # Compares the output from the "make_md5" suite of scripts and locates # duplicates. # # usage: finddups_md5 list1.md5 [... listN.md5] # # typical usage: (finding dups prior to making backups) # make_md5 Image | tee foo.md5 # finddups_md5 ~/Misc/Disc/*.md5 foo.md5 | tee foo.1 # [examine foo.1 manually and edit out any exemptions] # cat foo.1 |awk '{print $2}'|xargs rm -f $1 # # -- # Copyright/left 1995-2000 Chris Baird while (@ARGV) { $infile = shift @ARGV; open (CKFILE, "$infile"); while () { chop; ($hash, $name) = split; if ($bigarray{$hash} eq "") { $bigarray{$hash} = $infile . ":" . $name; } else { printf ("%s \t%s\n", $hash, $name); } } }