Monday, October 08, 2007

Integrity Checking

If you have a file foobar and a md5sum file foobar.md5sum in the same folder, then you can check the integrity of foobar using the following command:

$ md5sum -c foobar.md5sum

The md5sum command will generate the md5 checksum for foobar and compare it to the md5 stored in foobar.md5sum. If everything's fine, then it will output 'OK' for the file.