1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/shasum.md

33 lines
837 B
Markdown
Raw Normal View History

2017-10-04 19:29:42 +02:00
# shasum
> Calculate or check cryptographic SHA checksums.
> More information: <https://manned.org/shasum>.
2017-10-04 19:29:42 +02:00
- Calculate the SHA1 checksum for a file:
2021-09-03 12:29:07 -07:00
`shasum {{path/to/file}}`
2017-10-04 19:29:42 +02:00
- Calculate the SHA256 checksum for a file:
2021-09-03 12:29:07 -07:00
`shasum --algorithm 256 {{path/to/file}}`
2017-10-04 19:29:42 +02:00
- Calculate the SHA512 checksum for multiple files:
2021-09-03 12:29:07 -07:00
`shasum --algorithm 512 {{path/to/file1}} {{path/to/file2}}`
2017-10-04 19:29:42 +02:00
2020-12-18 15:17:54 +01:00
- Calculate and save the list of SHA256 checksums to a file:
2021-09-03 12:29:07 -07:00
`shasum --algorithm 256 {{path/to/file1}} {{path/to/file2}} > {{path/to/file.sha256}}`
- Check a file with a list of sums against the directory's files:
2017-10-04 19:29:42 +02:00
2021-09-03 12:29:07 -07:00
`shasum --check {{path/to/file}}`
2017-10-04 19:29:42 +02:00
- Check a list of sums and only show a message for files for which verification fails:
2020-12-18 13:47:34 +01:00
2021-09-03 12:29:07 -07:00
`shasum --check --quiet {{path/to/file}}`
2020-12-18 13:47:34 +01:00
- Calculate the SHA1 checksum from stdin:
2017-10-04 19:29:42 +02:00
2021-09-03 12:29:07 -07:00
`{{some_command}} | shasum`