GNU bug report logs -
#47023
df utilility displays G instead of GM as unit size for Gigabytes in power of 1000
Previous Next
Full log
View this message in rfc822 format
L A Walsh <coreutils <at> tlinx.org> [2021-03-10 13:27:15 -0800]:
> On 2021/03/10 06:50, Glenn Golden wrote:
> > Pádraig, Philippe, Paul -
> >
> > Pádraig Brady [Tue, 9 Mar 2021 19:51:45 +0000]:
> > > > On 09/03/2021 12:58, Philippe Bénézech via GNU coreutils Bug Reports wrote:
> > > > Dear maintener,
> > > >
> > > > I found a reproducible bug in df utility, installed in debian stable
> > > >
> > > > $ df --version |head -1
> > > > df (GNU coreutils) 8.30
> > > > $ cat /etc/debian_version
> > > > 10.8
> > > >
> > > > df displays G instead of GM as unit size for Gigabytes in power of 1000
> > > > (but the value is correct)
> ----
> The documentation says:
>
> -h, --human-readable
> print sizes in powers of 1024 (e.g., 1023M)
>
> -H, --si
> print sizes in powers of 1000 (e.g., 1.1G)
>
> How is this a bug?
>
> If the idea is to print a scaling factor and use the minimum
> space necessary (1 byte for the prefix), it seem to be doing
> exactly what it is documented to do.
>
If you read the referenced post
https://lists.gnu.org/archive/html/coreutils/2020-09/msg00001.html
you'll understand what the issue is.
>
> Side rant:
> Using decimal prefixes with a binary unit (1B=2**3 bits)
> defeats the purpose of using a common multiplier for metric.
> Since computers use base-2, similar prefixes should be used.
> Just because the disk-industry bought and paid for the
> ruling to use base-10 doesn't mean that memory comes in
> units of 1-million, 1-billion or 1-trillion bytes or
> that disk space is organized in decimal units.
>
We've been thru all this before. See
https://lists.gnu.org/archive/html/coreutils/2020-09/msg00007.html
>
> Second, minor, side rant:
> Would be nice if more attention was paid to fixing mailers encoding
> "Pádraig" and "Bénézech" as "P�draig" and "B�n�zech"
>
If you see substitute encodings like that, it strongly suggests the problem
is your MUA, not mine. My posting to the list (the one you quote from above)
shows the accented characters correctly. I'll be happy to send you a screenshot
if you wish.
- Glenn Golden
This bug report was last modified 4 years and 155 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.