sha224sum
Calculate or verify SHA224 checksums
TLDR
Calculate the SHA224 checksum for one or more files
Calculate and save the list of SHA224 checksums to a file
Calculate a SHA224 checksum from stdin
Read a file of SHA224 checksums and filenames and verify all files have matching checksums
Only show a message for missing files or when verification fails
Only show a message when verification fails, ignoring missing files
Check a known SHA224 checksum of a file
SYNOPSIS
sha224sum [OPTION]... [FILE]...
PARAMETERS
-b, --binary
Read in binary mode.-c, --check
Read SHA224 sums from FILEs and check them.--tag
Create a BSD-style checksum.-t, --text
Read in text mode (default).-z, --zero
End each output line with NUL, not newline, and disable file name escaping.--help
Display a help message and exit.--version
Output version information and exit.
DESCRIPTION
The sha224sum
command calculates and verifies SHA224 message digests. It reads files specified as arguments or standard input if no files are provided. For each file, it outputs the SHA224 hash (a 224-bit cryptographic hash) followed by the filename. When verifying sums using the -c
option, sha224sum
reads lines consisting of SHA224 checksums, a space, a flag indicating binary or text mode, and a filename. It then recalculates the SHA224 sum for each file and compares it to the checksum in the input. It reports whether each file passed or failed the checksum verification. The command is part of the GNU Coreutils package and is commonly used to ensure the integrity of downloaded or transferred files. sha224sum
implements the SHA224 algorithm as defined by the FIPS PUB 180-4 standard.
CAVEATS
When verifying checksums with the -c
option, the input file format must be strictly adhered to. In particular, the space between the checksum and the filename is important.
Using -b
or -t
is only relevant on systems that distinguish between binary and text files (e.g., Windows). On Linux/Unix, these options essentially have no effect.
EXIT STATUS
The exit status is 0 if all files were processed successfully, or 1 if an error occurred. When verifying, a non-zero exit status means that at least one file failed to verify.
HISTORY
The sha224sum
command was introduced as part of the GNU Coreutils package, providing a tool for generating and verifying SHA224 message digests.
The SHA224 algorithm itself was developed as a variant of the SHA-2 family of cryptographic hash functions. Its inclusion in Coreutils reflects the increasing importance of strong cryptographic hashing for data integrity verification.
The command saw increased usage as security best practices evolved and the need for alternatives to older, weaker hashing algorithms like MD5 and SHA1 became apparent. The command benefits from being included in GNU coreutils as being available in most linux distributions by default.