in reply to Removing Duplicate Files
As suggested by others, you can use the Digest::MD5 module in the perl script (and make the script a bit longer), in case you want to save run time by only computing MD5 signatures on sets of files that are the same size.# output of "md5" is one line per file: "MD5 (filename) = signature" find . -type f -print0 | xargs -0 md5 | perl -ne '/MD5 \((.*)\) = (\S+)/ or next; ($f,$m)=($1,$2); $s=-s $f; +if($h{"$m $s"}){unlink $f} $h{"$m $s"}++'
|
|---|