GNU bug report logs - #18119
df --si misleading output units

Previous Next

Package: coreutils;

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.

Full log


Message #11 received at 18119 <at> debbugs.gnu.org (full text, mbox):

From: Kernc <kerncece <at> gmail.com>
To: Bob Proulx <bob <at> proulx.com>
Cc: 18119 <at> debbugs.gnu.org
Subject: Re: bug#18119: df --si misleading output units
Date: Mon, 4 Aug 2014 15:31:45 +0200
[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)]

This bug report was last modified 4 years and 154 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.