On Fri 06 Jul 2007 17:05:47 NZST +1200, Douglas Royds wrote: > md5sum lacks a -r (recurse) option, so we have to use find and xargs to > create an md5sum file suitable for burning to CD: > > find . -type f -print0 | xargs --null md5sum | grep -v md5sums.txt > > md5sums.txt
> This seems to work, but is there a better way? No, that's what find/xargs are for. There are however some possible improvements. Most notably, your commands don't always work: you are excluding *all* files called md5sums.txt from your checksum list, not just the one you're writing the checksums too. You also want to sort the checksum list alphabetically by filename, so you can use these lists with diff, which gives you a lightspeed result of which files have changed between 2 directories. This and a lot more you find in the md5 script of my scriptutils package. Volker -- Volker Kuhlmann is list0570 with the domain in header http://volker.dnsalias.net/ Please do not CC list postings to me.
