#786564 Please add option for extra precision human readable output

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
Goswin von Brederlow
Date:
2015-06-11 11:12:06 UTC
Severity:
wishlist
#786564#5
Date:
2015-05-22 21:24:03 UTC
From:
To:
Hi,

when using "df -h" the output will use the largest unit that doesn't
have a leading 0. This often results in quite imprecise output, e.g.
1.1T or 1.8G. It would be nice if instead it cout use the smallest
unit that use 4 or less characters (maybe even 5 if a "." is involved).

So the output would go

    0 -  9999           0 -  9999
10.0k - 9999k  or  10.00k - 9999k
10.0M - 9999M      10.00M - 9999M
10.0G - 9999G  or  10.00G - 9999G

and so on. Extra points for adding a --precision=<num chars> instead
of hardcoding 4/5 chars.

MfG
	Goswin

#786564#10
Date:
2015-05-22 21:37:04 UTC
From:
To:
I'm struggling to think of a use case that requires 4 digits of
precision on a terabyte filesystem. If you need to know the exact size,
then get the size in bytes. Otherwise, it's probably close enough.

Mike Stone

#786564#15
Date:
2015-06-11 09:49:42 UTC
From:
To:
4 chars for the number, which would only be 1-2 digits of precision.
As in 11.7G instead of 12G or 1750M instead of 1.8G. 4 digits of
precision would indeed be too much.

MfG
	Goswin

#786564#20
Date:
2015-06-11 11:08:56 UTC
From:
To:
We already have at least two digits of precision and often three. Your
1750M *is* 4 digits of precision. And you said "maybe even 5 if a . is
involved". But I'll restate to avoid the quibble: I'm struggling to
think of a use case that requires 3 digits of precision on a terabyte
filesystem. If you need to know the exact size, then get the size in
bytes. Otherwise, it's probably close enough.

ike stone