How to: Calculate sha checksum of files using shasum family of commands
Almost any problem that can be answered in a single word or line is available as a command line utility on Linux. Using shasum family of commands you can calculate the sha hash/check sum of files in a single go. You can even use them in scripts to automate various tasks.
Members of family are - shasum, sha1sum, sha224sum, sha256sum, sha384sum and sha512sum. “shasum” is the all in one parent command, i.e. it includes all the features provided by rest of the members.
Here is how you use it to simply calculate the check sum for the algorithm of your choice.
[shredder12]$ shasum -a 256 file.ext
Using the ‘-a’ option we choose the algorithm to be used. Here we go for 256-bit version. You may have already guessed that the above command is equivalent to sha256sum and similarly for others. Default is the sha-1 message digest.
[shredder12]$ sha256sum file.ext