2017-10-04 20:29:42 +03:00
|
|
|
# shasum
|
|
|
|
|
|
|
|
> Calculate or check cryptographic SHA checksums.
|
|
|
|
|
|
|
|
- Calculate the SHA1 checksum for a file:
|
|
|
|
|
|
|
|
`shasum {{filename}}`
|
|
|
|
|
|
|
|
- Calculate the SHA256 checksum for a file:
|
|
|
|
|
2017-10-05 12:20:54 +03:00
|
|
|
`shasum --algorithm 256 {{filename}}`
|
2017-10-04 20:29:42 +03:00
|
|
|
|
|
|
|
- Calculate the SHA512 checksum for multiple files:
|
|
|
|
|
2017-10-05 12:20:54 +03:00
|
|
|
`shasum --algorithm 512 {{filename1}} {{filename2}}`
|
2017-10-04 20:29:42 +03:00
|
|
|
|
2017-10-05 12:20:54 +03:00
|
|
|
- Check a file with a list of sums against the directory's files:
|
2017-10-04 20:29:42 +03:00
|
|
|
|
2017-10-05 12:20:54 +03:00
|
|
|
`shasum --check {{list_file}}`
|
2017-10-04 20:29:42 +03:00
|
|
|
|
|
|
|
- Calculate the SHA1 checksum from stdin:
|
|
|
|
|
|
|
|
`{{somecommand}} | shasum`
|