[plug] ridiculous UNIX one-liner

Craig Ringer craig at postnewspapers.com.au
Thu Jan 30 00:28:32 WST 2003


Whoops, meant:
(eg, last cut -f is "-f 2-" not "-f 2")

for SUM in `find -type f -exec md5sum "{}" \; | tee /tmp/proglog | sort
| uniq -c -w 32 | sort -n | egrep -v '^[ ]+1' | cut -d '        ' -f 2 |
cut -d ' ' -f 1` ; do grep $SUM /tmp/proglog ; echo ; done | cut -d ' '
-f 2- | tee /tmp/nonunique_file_groups



More information about the plug mailing list