summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2013-03-12 13:43:08 +0000
committerPádraig Brady <P@draigBrady.com>2013-03-22 08:58:30 +0000
commit33242826650b8ed4ea5cfca646cb63bd0ff96d3e (patch)
treed2c409648a4c87933b7687adbaa6ca3cff260f38 /doc
parent2c2d0b3644c2ce2fb723b7f888e3da3a1e4e3bca (diff)
downloadcoreutils-33242826650b8ed4ea5cfca646cb63bd0ff96d3e.tar.xz
doc: clarify stat the meaning of --format="%t %T"
* src/stat.c (usage): Mention that the values are only defined for character and block special files. * doc/coreutils.texi (stat invocation): Likewise. Also mention st_rdev. Reported in http://bugs.gnu.org/13927
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index c6b3b3226..8f1df4525 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -11631,8 +11631,8 @@ The valid @var{format} directives for files with @option{--format} and
@item %N - Quoted file name with dereference if symbolic link
@item %o - Optimal I/O transfer size hint
@item %s - Total size, in bytes
-@item %t - Major device type in hex
-@item %T - Minor device type in hex
+@item %t - Major device type in hex (see below)
+@item %T - Minor device type in hex (see below)
@item %u - User ID of owner
@item %U - User name of owner
@item %w - Time of file birth, or @samp{-} if unknown
@@ -11645,6 +11645,11 @@ The valid @var{format} directives for files with @option{--format} and
@item %Z - Time of last change as seconds since Epoch
@end itemize
+The @samp{%t} and @samp{%T} formats operate on the st_rdev member of
+the stat(2) structure, and are only defined for character and block
+special files. On some systems or file types, st_rdev may be used to
+represent other quantities.
+
The @samp{%W}, @samp{%X}, @samp{%Y}, and @samp{%Z} formats accept a
precision preceded by a period to specify the number of digits to
print after the decimal point. For example, @samp{%.3X} outputs the