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

       -type f = Files only (md5sum doesn't want directories)
       -print0 = Null terminate lines so that filenames can contain spaces
       --null = Accept null-terminated lines

grep -v is required as find finds the half-built md5sum file. The alternative would be to drop the md5sum file into a different directory, then include it on the CD/DVD. I've dropped on a .txt extension Windows-style, as that's where a lot of CDs get viewed.

Burn the whole lot to CD, then check that it worked with:

   md5sum --check md5sums.txt | grep FAILED

This seems to work, but is there a better way?
Douglas.







=======================================================================
This email, including any attachments, is only for the intended
addressee.  It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================

Reply via email to