bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18624: mention stat(1) default format


From: Bernhard Voelker
Subject: bug#18624: mention stat(1) default format
Date: Sat, 04 Oct 2014 14:04:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0

On 10/04/2014 06:03 AM, 積丹尼 Dan Jacobson wrote:
It seems the stat(1) man and info pages mention often --format but don't
say what the default --format is if no --format argument is given.

I wouldn't document the output of the default in detail because this
is affected by translation (and we can't ensure that the translators
will translate the strings in src/stat.c identically to the TEXI file),
but at least the --terse mode should be documented.
The following patch fixes this.

Thanks & have a nice day,
Berny

From eefb3eaab194384f70509ee544aa87a92ef66e37 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <address@hidden>
Date: Sat, 4 Oct 2014 13:59:20 +0200
Subject: [PATCH] doc: document stat's output with the --terse option

* 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 <address@hidden>
in http://bugs.gnu.org/18624
---
 doc/coreutils.texi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 03bb710..32261f6 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -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 thus the example
+illustrates the default format in terse form.  Please note that the format
+string would include another @samp{ %C} at the end with an active SELinux
+security context.
address@hidden
+$ stat --format="%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %W %o" ...
+$ stat --terse ...
address@hidden example
+
+The same illustrating terse output in @option{--file-system} mode:
address@hidden
+$ stat -f --format="%n %i %l %t %s %S %b %f %a %c %d" ...
+$ stat -f --terse ...
address@hidden example
 @end table

 The valid @var{format} directives for files with @option{--format} and
--
1.8.4.2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]