I’ve been using Linux for a long time. While it lost the battle for my desktop, it still reigns supreme in my server world. I have this very occasional habit of wanting to check if two files are really, honestly, undoubtedly the same.
I had that need again today.
I’ve always used
md5sum on Linux.
sudo port search md5sum was a bust. I Googled around. I figured I’d just have to find the package that contains
sudo port install [package]. No dice. Nothing promising for miles around, or at least through page 5 of the Google results.
Eventually I landed on Wikipedia’s md5sum page. Then a flood of vague memories hit me. Macs have a similar program, but it’s named
md5 and its output formatting is slightly different (but the calculated hash is the same). It had been ages since I had discovered this, and I had totally forgotten.
So, instead of
sudo port install md5sum, I’ve edited my
~/.bash_aliases file to contain this:
alias md5sum='man md5'
Maybe there really is a fabled
md5sum for Mac, but this is good enough for me. This will remind the more frozen part of my brain that I really want to type
md5 [filename] instead. And then I won’t go a-Googling for it any more. And perhaps, neither will you.
md5 man page on my Mac shows it to be part of
openssl, just in case you wondered.