GNU bug report logs -
#47085
du: why does 'usage' show prefixes 'Z' or 'Y' if they are disallowed?
Previous Next
Reported by: L A Walsh <coreutils <at> tlinx.org>
Date: Fri, 12 Mar 2021 04:54:02 UTC
Severity: normal
Tags: notabug
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 47085 <at> debbugs.gnu.org (full text, mbox):
Hi,
On Thu, Mar 11, 2021 at 08:53:03PM -0800, L A Walsh wrote:
> I thought to display 0 (or 0<magnitude>) for 1st arg by doing:
>
> du -BY, as -B says I can list a unit for scaling, but for
> -BY and -BZ I get:
> du: -B argument 'Y' too large.
>
> It doesn't even look to see how much space is used, it
> immediately returns Y & Z are "too large".
Speculation (i.e., I did not look at the code): Z means 2^70, Y means
2^80, so they are both too big for unsigned 64bit integers. Thus they
may be too big for du?
> Why are those suffixes listed as valid under the program 'usage'
> and manpage, when they are automatically disallowed?
Perhaps they are automatically used with sufficiently sized integer types,
i.e., this may be future proofing?
You could look at the code to get a deeper insight.
HTH,
Erik
--
Be water, my friend.
-- Bruce Lee
This bug report was last modified 3 years and 89 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.