I burn CDs and DVDs for my Linux CD Mall website on a CentOS 4 machine and use md5sum checksums to ensure that the ISO images have downloaded correctly from the http or ftp server or via bittorrent. I store each ISO files's md5sum in a separate .md5 file and use the md5sum command's -c flag to check the contents are valid like so:
If the file checksums correctly, then the output will look like this:
In order to check multiple files at once, it would be nice to do this:
but the md5sum command in CentOS 4 complains with this error message:
This method of checking multiple files at once does work for more recent versions of the md5sum command but unfortunately does not work for the version shipped with CentOS 4. However, with a little BASH magic it's possible to still issue just one command (instead of manually entering them one after the other after each checksum has completed) like so:
Using the Simply Mepis example above, where there is a 32 bit and 64 bit version of the ISO image, the output from the above command would look like this:
So not quite as easy as "md5sum -c *.md5", but easier than having to checksum each one of them one by one.
0 comments:
Post a Comment