From 9a970586c7cb92887222cb7f61d4a1eb140a1856 Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Sun, 16 Nov 2025 18:24:47 +0100 Subject: [PATCH] du: document the TIME_STYLE env variable in usage 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 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/du.c b/src/du.c index f4dbd8c053..c6d6d7b334 100644 --- 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); -- 2.47.3