Geek Projects – Linux, Apache, MySQL, PHP, DNS A Linux Sysadmin

July 9, 2008

sha1sum in Mac OS X

Filed under: Mac OS X — Matt @ 5:44 pm

Mac OS X doesn’t come with a sha1sum utility. Neither does fink. So what’s the quickest way to check a sha1sum on a Mac? Use openssl:

openssl sha1 filename

If you’d like to roll this sha1sum check into a simple bash script, create the following sha1sum script:

#!/bin/bash
/usr/bin/openssl sha1 $1

Then make the sha1sum script executable, and run it:

chmod 755 sha1sum
./sha1sum filename

Powered by WordPress