]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
du: document the TIME_STYLE env variable in usage
authorBernhard Voelker <mail@bernhard-voelker.de>
Sun, 16 Nov 2025 17:24:47 +0000 (18:24 +0100)
committerBernhard Voelker <mail@bernhard-voelker.de>
Sun, 16 Nov 2025 17:31:20 +0000 (18:31 +0100)
The impact of the TIME_STYLE environment variable on du(1) was only
documented in the Texinfo manual.  To avoid surprises for users,
also mention TIME_STYLE in the usage text, i.e., for --help and man.
Organize similar as in ls(1), but as du(1) has slightly different
behavior it would be hard to share the translation.

* src/du.c (usage): Shorten the description of --time-style, and refer
to an additional --time-style / TIME_STYLE description below.

src/du.c

index f4dbd8c0535a1de833b4adc4f31bc4adc2ba099e..c6d6d7b3348c99555b18545b5ac5a15052831c80 100644 (file)
--- a/src/du.c
+++ b/src/du.c
@@ -336,9 +336,9 @@ Summarize device usage of the set of FILEs, recursively for directories.\n\
                           directory, or any of its subdirectories\n\
       --time=WORD       show time as WORD instead of modification time:\n\
                           atime, access, use, ctime or status\n\
-      --time-style=STYLE  show times using STYLE, which can be:\n\
-                            full-iso, long-iso, iso, or +FORMAT;\n\
-                            FORMAT is interpreted like in 'date'\n\
+"), stdout);
+      fputs (_("\
+      --time-style=STYLE   time/date format with --time; see TIME_STYLE below\n\
 "), stdout);
       fputs (_("\
   -X, --exclude-from=FILE  exclude files that match any pattern in FILE\n\
@@ -349,6 +349,12 @@ Summarize device usage of the set of FILEs, recursively for directories.\n\
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
       emit_blocksize_note ("DU");
       emit_size_note ();
+      fputs (_("\
+\n\
+The --time-style STYLE argument can be full-iso, long-iso, iso, or +FORMAT.\n\
+FORMAT is interpreted like in date(1).\n\
+Also the TIME_STYLE environment variable sets the default style to use.\n\
+"), stdout);
       emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);