Skip to content

Instantly share code, notes, and snippets.

@biswarupadhikari
Created August 7, 2012 02:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biswarupadhikari/3280904 to your computer and use it in GitHub Desktop.
Save biswarupadhikari/3280904 to your computer and use it in GitHub Desktop.
How to Generate Sha1 Or md5 Value for a File File Hash Code
filepath="/home/testuser/MyRadio.jpg"
myfilehash=$(sha1sum $filepath)
echo "File Sha1 Value is $myfilehash"
myfilehash=$(md5sum $myfilepath)
echo "File MD5 Value is $myfilehash"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment