Package: coreutils Version: 8.32-4.1 Severity: normal Dear Maintainer,
Quoth du(1):
-d, --max-depth=N
print the total for a directory (or file, with --all) only if it
is N or fewer levels below the command
line argument; --max-depth=0 is the same as --summarize
But:
$ du -as /dev/null
du: cannot both summarize and show all entries
Try 'du --help' for more information.
$ du -ad0 /dev/null
0 /dev/null
$ du -sd0 /dev/null
du: warning: summarizing is the same as using --max-depth=0
0 /dev/null
$ du -ss /dev/null
0 /dev/null
The -as invocation is as-expected (and even matches POSIX!).
The -ad0 one isn't: it should error the same way as -as.
The -sd0 one isn't either: ex def. if it's the same then it should be
equivalent to -ss (which, as expected, is equivalent to just -s).
A solution would be to either
(a) make it /actually/ be -s, matching the documentation, or
(b) stop lying in the documentation.
Best,
наб
-- System Information:
Debian Release: 11.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500,
'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.10.0-15-amd64 (SMP w/24 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND,
TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8),
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages coreutils depends on:
ii libacl1 2.2.53-10
ii libattr1 1:2.4.48-6
ii libc6 2.31-13+deb11u3
ii libgmp10 2:6.2.1+dfsg-1+deb11u1
ii libselinux1 3.1-3
coreutils recommends no packages.
coreutils suggests no packages.
-- no debconf information
signature.asc
Description: PGP signature

