GNU bug report logs - #79113
du --time-styles inconsistencies between manual and behaviour

Previous Next

Package: coreutils;

Reported by: Nicolas Boichat <nicolas <at> boichat.ch>

Date: Mon, 28 Jul 2025 14:45:02 UTC

Severity: normal

Full log


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

From: Nicolas Boichat <nicolas <at> boichat.ch>
To: bug-coreutils <at> gnu.org
Subject: du --time-styles inconsistencies between manual and behaviour
Date: Mon, 28 Jul 2025 22:44:21 +0800
Hi,

Version: env du --version => du (GNU coreutils) 9.7
OS: archlinux, x86-64

The GNU coreutils manual says
(https://www.gnu.org/software/coreutils/manual/coreutils.html#index-_002d_002dtime_002dstyle-1):
- "You can specify the default value of the --time-style option with
the environment variable TIME_STYLE; if TIME_STYLE is not set the
default style is ‘long-iso’." -> yes
- "For compatibility with ls, if TIME_STYLE begins with ‘+’ and
contains a newline, the newline and any later characters are ignored;"

That does not match behaviour, newlines are just used as-is:
```
$ env du --time --time-style="$(printf "+xyz\nabc")" blob
96 xyz
abc blob
```

- "if TIME_STYLE begins with ‘posix-’ the ‘posix-’ is ignored; and if
TIME_STYLE is ‘locale’ it is ignored."

Also doesn't match, `posix-` is not allowed, `locale` is not allowed:
```
$ env du --time --time-style=posix-iso blob
du: invalid argument ‘posix-iso’ for ‘time style’
Valid arguments are:
  - ‘full-iso’
  - ‘long-iso’
  - ‘iso’
Try 'du --help' for more information.
$ env du --time --time-style=locale blob
du: invalid argument ‘locale’ for ‘time style’
Valid arguments are:
  - ‘full-iso’
  - ‘long-iso’
  - ‘iso’
Try 'du --help' for more information.
```

Finally, the help text doesn't mention that +FORMAT is allowed.

Thanks!

Nicolas




This bug report was last modified 19 days ago.

Previous Next


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