File Check with MD5 Hash Using Linux
There are many times that you need to be sure that a file you downloaded from the internet or copied from a location is the same as the original. There are many tools that can help you with that but my favorite is md5sum (and md5deep when it comes to comparing directories). The usage is very simple. The command md5sum FILE will show you the hash for the file and the file name. So the only thing you have to do is get the sum of the original file, the sum of your file and compare them. If they are the same, your file is not corrupted or tampered with. Comparing the hashes your self may not be very easy but there is a way to do it using a hash file. Simply save the result of the above command to a file, like md5sum FILE > hashfile.md5 and then use the option -c to compare the hash of your file to the hash in the hashfile. I always use relative paths because that way you can export the hash of the file to a hash file that is on the same directory with the original file for exam