MD5SUM

What is md5sum?

MD5SUM is a freeware program that calculates and verifies MD5 hashes - which is just a geeky way of saying it creates a sort of digital fingerprint of a file. And since every file will have a unique fingerprint (any change to a file will cause its MD5 fingerprint to also change) it follows then that the md5sum program can be used to verify the integrity of files (i.e., to verify that a file has not been corrupted during file transfer, or as the result of disk error, human meddling, etc.).

When you perform an md5 check, you are comparing the fingerprint of the files you downloaded to your hard drive to the fingerprint of the files on the server you downloaded from. If the md5's (fingerprints) match, you have an uncorrupted file.

You may download the md5sum program for windows here: md5sum.exe. (md5sum comes standard on most linux distributions, but for the most part that's not us).

To install it, simply copy the program to the appropriate folder.


Open Command Window Here

There are several md5sum tools available but the best, most reliable of the bunch happens to be a command line program. That means md5sum must be run from a DOS prompt like computers used to use before windows. If you just double click the md5sum.exe file a command prompt will open and then immediately close again. The reason for this is that you must specify the name of the file you want to check. Without a file name, there is nothing for the program to do and so it shuts down. This is not a big deal, but just double clicking does not give you a chance to say which file you're checking. So the prompt window must be open. However, since the average windows user today is unfamiliar with the command line, I recommend you use a windows powertoy to help make the task easier.

This PowerToy adds an "Open Command Window Here" context menu option on file system folders, giving you a quick way to open a command window in the selected folder. The advantage of using this powertoy is that you do not have to navigate the file system using DOS - which is a real headache saver. You will understand what this means as we go along.

You may download the Open Command Window program here: CmdHerePowertoySetup.exe. (Alternately, you may download it directly from Microsoft here, and you can find more information about it on the PowerToys for Windows XP website).

Install the Open Command Window Here powertoy the same way you would install any other program.


How to verify a file using md5sum

We assume you have already downloaded one or more ISO files (or even large zip files). Also, you should have downloaded an MD5SUM.txt file that contains the digital fingerprint of the file on the server. (Note, the name of the txt file may match the file name you downloaded).

In windows explorer, browse to the folder where the file(s) are saved. Now, highlight the folder name in the left side of windows explorer and right click. You will see the "Open Command Window Here" option.

Click it and a command prompt will open - already in the folder where your files are.

Now just type md5sum (you don't need to include the '.exe' part) and the name of the file you want to verify. For example md5sum OTR70.ISO. Then press enter. The program will take a moment to check the file and when it's done it will display a long number.

That number should match the one in the txt file you found in the ftp directory.

If it matches, you're good to go and may feel confident using it or burning it to cd/dvd.

If it does not match, then your file has not downloaded properly. Yes, it's true, a mistake could have happened when the md5sum.txt file was created (stranger things have been known to happen), but it's highly unlikely. If you re-download and consistently get a mismatch in the md5sum values, AND the file does not behave as expected, then let me know and I will double check or regenerate the txt file on the server.

Note 1. One reason for a bad file might be if I update the file in the middle of your download.

Note 2. md5sum can work on any type of file. For example, the iso files available through anonymous ftp, as well as the large zip files like you get from archive.org.


Save md5sum results to a file

When you close the command prompt window, the result of the md5sum check disappears with it. But suppose you forgot to download the txt file from the server or didn't save it to the same location. In those instances it might be easier to save the result of your md5sum check to a file so you can check and compare later. To do this, just direct the results to a file. For example, at the command prompt type:

md5sum OTR70.ISO > MYMD5SUM.txt

When the md5sum program finishes checking the file it will save the result to the file you indicate (you can use any name you like). If the file does not already exist, one will be created for you.


Checking multiple files at the same time

Suppose you download several large files and you want to check each one but find comparing the results one-by-one to the md5sum.txt file a bit straining. The solution would be to test the files all at one time and save the results to your own text file. To do that, save all the files to the same folder, then in the command window type

md5sum *.iso > mymd5sum.txt

The asterix means all iso files in the current directory will be tested, and the "greater than" sign means a file will be created in which the values will be stored, and of course the 'mymd5sum.txt' will be the name of the file - which you'll want to be different from the one you download because you'll (1) not want to overwrite the one you download, and (2) want to be able to tell them apart.

Depending on the speed of your computer this may take up to as much as five minutes, so start it running then go make yourself a sandwich or something. When you return, you can open both files for easy side-by-side comparison.


DOS vs GUI

If DOS and the command prompt are not your thing, you can do a web search for md5sum programs that have a graphical user interface. However, it's been my experience these are memory hogs and will not always function correctly on very large files. The best I've found to date is at md5summer.org but for one hundred percent reliability, the command line is still your best friend.


Troubleshooting

  1. md5sum.exe is not recognized




[ ISO | FTP | MD5SUM | Daemon Tools ]