You can use the MD5 hash of a file you download to check it's integrity. From Wikipedia:

Just typing md5sum <filename> will give you the MD5 hash of that file which you can then visually check against another copy, perhaps on a website. An easier way of doing things though is to use the --check option. For example, let's say I just downloaded the centOS ISOs and I want to verify I have correct copies. If I also have a copy of the MD5 hash called MD5SUM-CDS (which I have to trust is correct) I can do the following:

$ md5sum --check MD5SUM-CDS
CentOS-4.0-x86_64-bin1of4.iso: OK
CentOS-4.0-x86_64-bin2of4.iso: OK
CentOS-4.0-x86_64-bin3of4.iso: OK
CentOS-4.0-x86_64-bin4of4.iso: OK

Much easier than scanning the hashes visually.

You can also do this with SHA1SUM. Eg. sha1sum --check SHA1SUM

To generate an MD5 of a string, see GenerateMd5.


CategoryLinux

CheckMd5 (last edited 2008-07-18 14:05:47 by DavidKeen)