>shasum_
With
shasum
command you can work with SHA Checksums.
shasum [flag] [file]
Store the Checksum
You 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 algorithm
The flag-a
allows 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 mode
The flag-b
allows you to read files in binary mode.
shasum -b file.bin
Check two SHA sums
You 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 help
Writing the command followed by the-h
h flag will display a little
help paragraph with the main functions of this command.
shasum -h