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

1 Comment »

  1. Try the “shasum” command instead.

    Comment by PCheese — December 17, 2009 @ 4:36 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress