bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47085: du: why does 'usage' show prefixes 'Z' or 'Y' if they are dis


From: Erik Auerswald
Subject: bug#47085: du: why does 'usage' show prefixes 'Z' or 'Y' if they are disallowed?
Date: Fri, 12 Mar 2021 08:52:22 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]