GNU bug report logs -
#18624
mention stat(1) default format
Previous Next
Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Date: Sat, 4 Oct 2014 04:04:02 UTC
Severity: normal
Tags: fixed
Done: Bernhard Voelker <mail <at> bernhard-voelker.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 10/04/2014 01:04 PM, Bernhard Voelker wrote:
> 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 <mail <at> bernhard-voelker.de>
> 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 <jidanni <at> jidanni.org>
> 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.
> +@example
> +$ stat --format="%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %W %o" ...
> +$ stat --terse ...
> +@end example
That's a cool way to document the default format.
I'd change the text slightly like:
The output of the following commands are identical and the --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.
thanks!
Pádraig.
This bug report was last modified 10 years and 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.