md5sum on Mac OS X | check MD5 hashes

Written by
Date: 2012-07-13 06:34:32 00:00

A good way to verify if a transferred file has not lose a bit or two in its path from one PC to another, is to use MD5 hash. What you do, is calculate the digital signature of the file on both sides, then compare the output. If they are the same, you are OK, if not, you need to transfer the file again.

Mac OS X, does not come with md5sum installed by default, but it comes with an equivalent tool that you can use instead. md5. To calculate the 128 bit MD5 hash of a file, run this command:

md5 [file.ext]

If you need the same output format that md5sum has, use this.

md5 -r [file.ext]

openssl also has a function to calculate md5 hash.

openssl md5 [file.ext]

That is all. You can now be sure that file you transferred via, ftp, http, or any other way is the same in both sides of path.