`md5sum': Print or check message-digests
========================================
`md5sum' computes a 128-bit checksum (or "fingerprint" or
"message-digest") for each specified FILE. If a FILE is specified as
`-' or if no files are given `md5sum' computes the checksum for the
standard input. `md5sum' can also determine whether a file and
checksum are consistent. Synopses:
md5sum [OPTION]... [FILE]...
md5sum [OPTION]... --check [FILE]
For each FILE, `md5sum' outputs the MD5 checksum, a flag indicating
a binary or text input file, and the filename. If FILE is omitted or
specified as `-', standard input is read.
The program accepts the following options. Also see Note:Common
options.
`-b'
`--binary'
Treat all input files as binary. This option has no effect on Unix
systems, since they don't distinguish between binary and text
files. This option is useful on systems that have different
internal and external character representations. On MS-DOS and
MS-Windows, this is the default.
`-c'
`--check'
Read filenames and checksum information from the single FILE (or
from stdin if no FILE was specified) and report whether each named
file and the corresponding checksum data are consistent. The
input to this mode of `md5sum' is usually the output of a prior,
checksum-generating run of `md5sum'. Each valid line of input
consists of an MD5 checksum, a binary/text flag, and then a
filename. Binary files are marked with `*', text with ` '. For
each such line, `md5sum' reads the named file and computes its MD5
checksum. Then, if the computed message digest does not match the
one on the line with the filename, the file is noted as having
failed the test. Otherwise, the file passes the test. By
default, for each valid line, one line is written to standard
output indicating whether the named file passed the test. After
all checks have been performed, if there were any failures, a
warning is issued to standard error. Use the `--status' option to
inhibit that output. If any listed file cannot be opened or read,
if any valid line has an MD5 checksum inconsistent with the
associated file, or if no valid line is found, `md5sum' exits with
nonzero status. Otherwise, it exits successfully.
`--status'
This option is useful only when verifying checksums. When
verifying checksums, don't generate the default one-line-per-file
diagnostic and don't output the warning summarizing any failures.
Failures to open or read a file still evoke individual diagnostics
to standard error. If all listed files are readable and are
consistent with the associated MD5 checksums, exit successfully.
Otherwise exit with a status code indicating there was a failure.
`-t'
`--text'
Treat all input files as text files. This is the reverse of
`--binary'.
`-w'
`--warn'
When verifying checksums, warn about improperly formatted MD5
checksum lines. This option is useful only if all but a few lines
in the checked input are valid.