]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: document stat's output with the --terse option
authorBernhard Voelker <mail@bernhard-voelker.de>
Sat, 4 Oct 2014 15:09:59 +0000 (17:09 +0200)
committerBernhard Voelker <mail@bernhard-voelker.de>
Sat, 4 Oct 2014 15:12:58 +0000 (17:12 +0200)
* doc/coreutils.texi (stat invocation): Add a paragraph documenting
stat's output format when the --terse option is specified, both in
normal and in --file-system mode.

Reported by Dan Jacobson <jidanni@jidanni.org>
in http://bugs.gnu.org/18624

doc/coreutils.texi

index 03bb710e917bc342a7736900719b3764bc005b30..aece931f2eeb395a90eac705d6eeb5c99e752125 100644 (file)
@@ -11885,6 +11885,20 @@ $ stat --printf='%d:%i\n' / /usr
 @cindex terse output
 Print the information in terse form, suitable for parsing by other programs.
 
+The output of the following commands are identical and the @option{--format}
+also identifies the items printed (in fuller form) in the default format.
+Note the format string would include another @samp{%C} at the end with an
+active SELinux security context.
+@example
+$ stat --format="%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %W %o" ...
+$ stat --terse ...
+@end example
+
+The same illustrating terse output in @option{--file-system} mode:
+@example
+$ stat -f --format="%n %i %l %t %s %S %b %f %a %c %d" ...
+$ stat -f --terse ...
+@end example
 @end table
 
 The valid @var{format} directives for files with @option{--format} and