GNU bug report logs - #16922
df --si -h should emit a warning

Previous Next

Package: coreutils;

Reported by: Mateusz Jończyk <mat.jonczyk <at> o2.pl>

Date: Sun, 2 Mar 2014 14:16:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: Mateusz Jończyk <mat.jonczyk <at> o2.pl>
Cc: 16922 <at> debbugs.gnu.org
Subject: bug#16922: df --si -h should emit a warning
Date: Sun, 02 Mar 2014 14:33:51 +0000
On 03/02/2014 12:33 PM, Mateusz Jończyk wrote:
> Hello,
> There should be a warning when running df --si -h because it will display results
> in blocks of 1024 and not 1000, as one might think (the switch --si displays blocks
> in a human-readable format when used by itself).

This is confusing.

I think the confusion stems from the option names themselves.
I.E. I'm not sure you'd want to warn as you might want to support overriding options.
Consider: alias df='df -h'

Then you could very well want to `df -H` to override the power from 1024 to 1000.

So really the option should be --human-si not just --si.

Also I notice that in GNU df, -h and -H are 1024 and 1000 based respectively,
whereas on FreeBSD it's the other way around :(

How about we just support --human-si and deprecate --si ?

thanks,
Pádraig.





This bug report was last modified 11 years and 140 days ago.

Previous Next


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