shasumcommand you can work with SHA Checksums.
shasum [flag] [file]
Store the ChecksumYou can store the output in a file by adding to the command line the string output symbol ">" and then the path and the name of the file.
Define the algorithmThe flag
-aallows you to choose which algorithm to use when defining the checksum of a file. The default algorithm is 1.
shasum -a algorithm file
Read in binary modeThe flag
-ballows you to read files in binary mode.
shasum -b file.bin
Check two SHA sumsYou can verify wheter two checksums belong to the same file or not (and so define wheter the two files are the same thing) wit the flag
-c. After storing the Checksums into two files (let say file1 and file2), you can write to command as follows:
shasum -c shaSum1 shaSum2
Display helpWriting the command followed by the
-hh flag will display a little help paragraph with the main functions of this command.