sha256sum
A command-line tool that prints the SHA-256 digest of files and can later check them against a saved list of digests.
In more detail
Run on files, it writes one line per file with the digest and the name, which can be saved as a manifest. Running sha256sum -c on that manifest recomputes each digest and reports, file by file, whether it still matches, so any change shows up. On macOS, where it may be missing, shasum -a 256 does the same job.
Examples
sha256sum changes.csv sample.txt results.csv > manifest.sha256sha256sum -c manifest.sha256 # results.csv: FAILEDshasum -a 256 -c manifest.sha256Related terms
- SHA-256 — A widely used hash function that turns any data into a 256-bit fingerprint, shown as 64 hexadecimal characters.
- manifest.json — A file written at backup time that lists every backed-up file with its SHA-256 digest, so a restore can be checked byte for byte.
- evidence sealing — Recording a cryptographic hash of collected evidence at a fixed moment, so that any later change to the files can be detected.
- checksum — A small value calculated from data and stored or sent with it, so the data can later be checked for accidental errors.
Taught in
- Internal Audits, Sampling & Evidence Chains — Cybersecurity Fundamentals, GRC & Cryptography