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: Pádraig Brady
Subject: bug#18624: mention stat(1) default format
Date: Sat, 04 Oct 2014 15:54:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

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 <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

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.





reply via email to

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