Subject: Re: bug#18119: df --si misleading output units

From: Kernc <[email-masked]>
Date: Mon, 4 Aug 2014 15:31:45 +0200

I understand. It does not specify the value in GiB, but the unit presented
- you say it's only magnitude, I'm calling it unit here¹ – is G, which
implies GiB, which makes it completely ambigous with regard to the output
unit of e.g. `--block-size=G` switch.

Please compare:

$ df --human-readable /dev/sdb2 | tail -1
/dev/sdb2        82G   67G   12G  86% /home
$ df --block-size=G /dev/sdb2 | tail -1
/dev/sdb2            82G   67G       12G  86% /home
$ df --si /dev/sdb2 | tail -1
/dev/sdb2        88G   71G   12G  86% /home
$ df --block-size=GB /dev/sdb2 | tail -1
/dev/sdb2            88GB  71GB      12GB  86% /home

Since `--block-size=GB` outputs the value in GB, and 'GB' is the unit
appended, why doesn't `--si` do the same (use SI-units to mark
"SI-magnitude" values)?

¹: Units are defined by order of magnitude prefix (e.g. G) and of base unit
(e.g. B). In our example, if the program only supplies the magnitude and
lets the common base unit be inferred, one gets 'GB' for `--si`. Which is
correct. But what other unit of can one thus construct when using `-h`
switch?