Jun 232008

md5sum is a builtin utility in openSUSE to verify if a file is reproduced exactly the same as the original. For instance, most if not all of the website from where you download files especially ISO files of operating systems for instance, they offer the MD5 Checksum files to cross verfiy that the download is not being tampered with or if there is a corrupted download. Another instance, would be a file copy where the same verification applies.

Let’s take the instance where we download a file from a website on the internet. I use putty.exe download to verify.

Download Putty.exe

linux-4518:~ # wget http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

Compute the MD5 Checksum

This file is downloaded to the /root folder. I now compute the MD5 key for the downloaded file.

linux-4518:~ # md5sum putty.exe
9bb6826905965c13be1c84cc0ff83f42  putty.exe

Here “9bb6826905965c13be1c84cc0ff83f42″ is the MD5checksum for putty.exe

MD5 Checksum from author

When you check the key against the original from the website, you’ll find the keys do match. However, if you want to take the pain of comparing such a big key, simply copy the MD5 checksum for putty.exe from the authors website and create a new file as follows:

9bb6826905965c13be1c84cc0ff83f42  putty.exe

Remember there should be two “spaces” between the key and the file putty.exe and no extra balnk lines.

Now do a comparison as follows:

linux-4518:~ # md5sum -c md5sum.txt
putty.exe: OK

That does the checking for you. This can be done against any file, media like CD-ROMs or DVDs.