shasum
TLDR
Calculate SHA-1 hash
SYNOPSIS
shasum [-a algorithm] [-b] [-c] [options] [files]
DESCRIPTION
shasum computes and verifies SHA message digests. SHA hashes are cryptographic fingerprints used for file integrity verification.
Algorithm selection chooses hash size. SHA-256 is commonly used for downloads and security. SHA-1 is legacy but still used in some contexts.
Check mode verifies files against recorded hashes. It reads a checksum file and confirms each listed file matches its hash.
Output format shows hash followed by filename. BSD-style output includes the algorithm name. Both formats are understood for verification.
Binary mode is recommended for non-text files. It ensures consistent hashing across platforms.
Stdin processing enables hashing command output or piped data without intermediate files.
PARAMETERS
-a ALG
Algorithm (1, 224, 256, 384, 512, 512224, 512256).-b
Binary mode.-c, --check
Check hashes from file.-t
Text mode (default).-p
Portable mode.-s, --status
Status only (with -c).-w, --warn
Warn about improper lines.--strict
Exit non-zero for improperly formatted lines.--tag
BSD-style output.-h, --help
Show help.
CAVEATS
SHA-1 is cryptographically weakened - use SHA-256+ for security. Hash verification requires original hash to be trusted.
HISTORY
shasum is a Perl script included with Perl. It provides a unified interface to SHA algorithms, mirroring the functionality of sha256sum and similar coreutils programs.


