Want to make sure a file is absolutely bit-for-bit (okay, not exactly but the probabilities are astronomical of has collisions) identical to a “genuine” file copy? Want to see if you downloaded said file correctly? Compare hashes, AKA checksums.
Basically, a hash condenses a file’s data into a small, pseudo-unique string of bits that is identical between identical files but otherwise different. Many files on the internet have their MD5 and/or SHA1 checksums posted to help you ensure your downloaded file is the same as the file on their servers.
To check the checksums, you just hash the file yourself, and compare the result with the one on the website. Below are instructions for hashing, depending on your operating system (stuff you type into your computer is in bold, variables are in angle brackets). For a large file, it may take a minute or two to hash; patience is a virtue.
1. Go here and download the program. It’s only 57KB, but you still have to grab it from a place like Download.com.
2. Open the program, select your desired hash type, then browse for the file you want to hash. The program might look like it’s crashed, but it’s just calculating the hash.
1. Open Terminal. It’s in Applications -> Utilities. Then go to the directory of the file using the cd command. You start in your home folder so cd Desktop for example will land you on the desktop.
2. Run the command /usr/bin/openssl <hash name> <filename> where <hash hame> is md5 or sha1. For example, /user/bin/openssl md5 linux.iso.
1. Go to a terminal window (in GNOME, the most common desktop system for Linux these days, it’s under Accessories) and navigate to the directory the file you wanted checked is in. You can use cd here too.
2. Run the command <hash name>sum -b <filename> where <hash name> is either md5 or sha1. For example, md5sum -b linux.iso.
For Mac and Linux I’m sure there’s a graphical way of getting an md5sum or sha1sum. However it probably requires downloading something, and why not use the tools you have on hand already?
Hope this helps! Stay safe, both online and offline, and have a great summer!