summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-01-29 18:44:41 +0000
committerPádraig Brady <P@draigBrady.com>2015-01-29 19:06:57 +0000
commitecc8f8104893f1eaae8a8e7e3e55c8c42f4c7206 (patch)
tree68ad0980858003ed67c21507bc7b77127452373a /doc
parent8b2bf5295f353016d4f5e6a2317d55b6a8e7fd00 (diff)
downloadcoreutils-ecc8f8104893f1eaae8a8e7e3e55c8c42f4c7206.tar.xz
doc: clarify the output format for the *sum utilities
* src/md5sum.c (usage): Detail the reasons for the default double space between checksum and file name. * doc/coreutils.texi (md5sum invocation): Likewise. Explicitly mention the 3 formats that --check supports. Fixes http://bugs.gnu.org/19725
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi15
1 files changed, 10 insertions, 5 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 99c7df3ac..0a82b657b 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -4057,8 +4057,11 @@ consistent. Synopsis:
md5sum [@var{option}]@dots{} [@var{file}]@dots{}
@end example
-For each @var{file}, @samp{md5sum} outputs the MD5 checksum, a flag
-indicating binary or text input mode, and the file name.
+For each @var{file}, @samp{md5sum} outputs by default, the MD5 checksum,
+a space, a flag indicating binary or text input mode, and the file name.
+Binary mode is indicated with @samp{*}, text mode with @samp{ } (space).
+Binary mode is the default on systems where it's significant,
+otherwise text mode is the default.
If @var{file} contains a backslash or newline, the
line is started with a backslash, and each problematic character in
the file name is escaped with a backslash, making the output
@@ -4089,9 +4092,11 @@ Read file names and checksum information (not data) from each
whether the checksums match the contents of the named files.
The input to this mode of @command{md5sum} is usually the output of
a prior, checksum-generating run of @samp{md5sum}.
-Each valid line of input consists of an MD5 checksum, a binary/text
-flag, and then a file name.
-Binary mode is indicated with @samp{*}, text with @samp{ } (space).
+Three input formats are supported. Either the default output
+format described above, the @option{--tag} output format,
+or the BSD reversed mode format which is similar to the default mode,
+but doesn't use a character to distinguish binary and text modes.
+@sp 1
For each such line, @command{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 file name, the file is noted as having