GNU bug report logs -
#18119
df --si misleading output units
Previous Next
Reported by: Kernc <kerncece <at> gmail.com>
Date: Sun, 27 Jul 2014 20:24:02 UTC
Severity: wishlist
Tags: wontfix
Merged with 47023
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18119 in the body.
You can then email your comments to 18119 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#18119
; Package
coreutils
.
(Sun, 27 Jul 2014 20:24:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Kernc <kerncece <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Sun, 27 Jul 2014 20:24:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
By example,
$ df --human-readable /dev/sdb2
Filesystem Size Used Avail Use% Mounted on
/dev/sdb2 82G 66G 12G 86% /home
$ df --si /dev/sdb2
Filesystem Size Used Avail Use% Mounted on
/dev/sdb2 88G 71G 13G 86% /home
In both cases, the output unit presented is G(iB) whereas a
power-of-1000 unit (GB) was requested in the latter invocation.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#18119
; Package
coreutils
.
(Sun, 03 Aug 2014 21:20:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 18119 <at> debbugs.gnu.org (full text, mbox):
Kernc wrote:
> By example,
>
> $ df --human-readable /dev/sdb2
> Filesystem Size Used Avail Use% Mounted on
> /dev/sdb2 82G 66G 12G 86% /home
> $ df --si /dev/sdb2
> Filesystem Size Used Avail Use% Mounted on
> /dev/sdb2 88G 71G 13G 86% /home
>
> In both cases, the output unit presented is G(iB) whereas a
> power-of-1000 unit (GB) was requested in the latter invocation.
Saying "G" does not specify either GiB nor GB. It specifies the
magnitude in the unit requested. Saying that it specifies GiB in both
cases is incorrect.
If SI powers of ten units were requested then that is emitted. If
human readable powers of two units were requested then that is
emitted.
Bob
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#18119
; Package
coreutils
.
(Mon, 04 Aug 2014 13:33:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 18119 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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?
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#18119
; Package
coreutils
.
(Mon, 04 Aug 2014 14:09:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 18119 <at> debbugs.gnu.org (full text, mbox):
Kernc wrote:
> 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)?
Because it's more concise that way, and because it's been that way for
years. No doubt it could have been done differently, but at this point ...
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#18119
; Package
coreutils
.
(Mon, 04 Aug 2014 16:51:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 18119 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The maturity of bugs is always a valid reason not to fix them. And "Unix"
is being phased out soon anyway.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#18119
; Package
coreutils
.
(Sat, 13 Sep 2014 18:25:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 18119 <at> debbugs.gnu.org (full text, mbox):
I confirm. info says:
> With human-readable formats, output sizes are followed by a size
> letter such as ‘M’ for megabytes. ‘BLOCK_SIZE=human-readable’ uses
> powers of 1024; ‘M’ stands for 1,048,576 bytes. ‘BLOCK_SIZE=si’ is
> similar, but uses powers of 1000 and appends ‘B’; ‘MB’ stands for
> 1,000,000 bytes.
There is at least a documentation bug, but in my book a bug in the output. "82G" is not a size.
--
Filipus Klutiero
http://www.philippecloutier.com
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#18119
; Package
coreutils
.
(Sat, 20 Oct 2018 03:54:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 18119 <at> debbugs.gnu.org (full text, mbox):
tags 18119 wontfix
severity 18119 wishlist
close 18119
stop
(triaging old bugs)
On 04/08/14 08:07 AM, Paul Eggert wrote:
> Kernc wrote:
>> 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)?
>
> Because it's more concise that way, and because it's been that way for
> years. No doubt it could have been done differently, but at this point ...
Note that in the meantime coreutils gained a new program: "numfmt".
This program performs unit conversions with much finer control,
including GiB and GB and others.
"numfmt --help" even includes the following examples:
---
$ df -B1 | numfmt --header --field 2-4 --to=si
---
Given the above, and with no further comments in 4 years, I am closing
this report.
-assaf
Added tag(s) wontfix.
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sat, 20 Oct 2018 03:54:02 GMT)
Full text and
rfc822 format available.
Severity set to 'wishlist' from 'normal'
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sat, 20 Oct 2018 03:54:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
18119 <at> debbugs.gnu.org and Kernc <kerncece <at> gmail.com>
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sat, 20 Oct 2018 03:54:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 17 Nov 2018 12:24:04 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Pádraig Brady <P <at> draigBrady.com>
to
control <at> debbugs.gnu.org
.
(Tue, 09 Mar 2021 19:44:01 GMT)
Full text and
rfc822 format available.
Forcibly Merged 18119 47023.
Request was from
Pádraig Brady <P <at> draigBrady.com>
to
control <at> debbugs.gnu.org
.
(Tue, 09 Mar 2021 19:52:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 08 Apr 2021 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 36 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.