From: Bernhard Voelker Date: Sun, 16 Nov 2025 17:24:47 +0000 (+0100) Subject: du: document the TIME_STYLE env variable in usage X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a970586c7cb92887222cb7f61d4a1eb140a1856;p=thirdparty%2Fcoreutils.git 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. --- 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);