Subject: Re: bug#47023: df utilility displays G instead of GM as unit size for Gigabytes in power of 1000

From: L A Walsh <[email-masked]>
Date: Wed, 10 Mar 2021 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.

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.

  I find it amazing that it is the French who most
  often vocalize support for the capitalistic-backed
  decision. 

*sigh*

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"
*double sigh*
:-)