GNU bug report logs - #18624
mention stat(1) default format

Previous Next

Package: coreutils;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18624 in the body.
You can then email your comments to 18624 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#18624; Package coreutils. (Sat, 04 Oct 2014 04:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 04 Oct 2014 04:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-coreutils <at> gnu.org
Subject: mention stat(1) default format
Date: Sat, 04 Oct 2014 12:03:28 +0800
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.




Information forwarded to bug-coreutils <at> gnu.org:
bug#18624; Package coreutils. (Sat, 04 Oct 2014 12:05:01 GMT) Full text and rfc822 format available.

Message #8 received at 18624 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>, 
 18624 <at> debbugs.gnu.org
Subject: Re: bug#18624: mention stat(1) default format
Date: Sat, 04 Oct 2014 14:04:32 +0200
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
+
+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
-- 
1.8.4.2





Information forwarded to bug-coreutils <at> gnu.org:
bug#18624; Package coreutils. (Sat, 04 Oct 2014 14:56:02 GMT) Full text and rfc822 format available.

Message #11 received at 18624 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: 18624 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#18624: mention stat(1) default format
Date: Sat, 04 Oct 2014 15:54:58 +0100
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.




Information forwarded to bug-coreutils <at> gnu.org:
bug#18624; Package coreutils. (Sat, 04 Oct 2014 15:17:01 GMT) Full text and rfc822 format available.

Message #14 received at 18624 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 18624 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#18624: mention stat(1) default format
Date: Sat, 04 Oct 2014 17:16:51 +0200
On 10/04/2014 04:54 PM, Pádraig Brady wrote:
> 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 for the review and the better wording.
Pushed:
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=b020002b4b

Have a nice day,
Berny




Added tag(s) fixed. Request was from Bernhard Voelker <mail <at> bernhard-voelker.de> to control <at> debbugs.gnu.org. (Sat, 04 Oct 2014 15:20:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 18624 <at> debbugs.gnu.org and 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> Request was from Bernhard Voelker <mail <at> bernhard-voelker.de> to control <at> debbugs.gnu.org. (Sat, 04 Oct 2014 15:20:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 02 Nov 2014 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 182 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.