GNU bug report logs - #50940
how df utility displays sizes - GB vs GiB

Previous Next

Package: coreutils;

Reported by: Danie de Jager <danie.dejager <at> gmail.com>

Date: Fri, 1 Oct 2021 15:02:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Glenn Golden <gdg <at> zplane.com>
To: Danie de Jager <danie.dejager <at> gmail.com>
Cc: 50940 <at> debbugs.gnu.org
Subject: bug#50940: how df utility displays sizes - GB vs GiB
Date: Fri, 1 Oct 2021 10:28:04 -0600
Danie de Jager <danie.dejager <at> gmail.com> [2021-10-01 15:28:10 +0200]:
> 
> The output from df -h and df -H is always G or M. Depending on who sends me
> usage stats I have to ask how the command was run to make sure I calculate
> usage correctly. Systems like Amazon EC2 use the explicit GiB suffix.
> Making it easier to know what sizes you are looking at.
> 
> Can a future release of df not be improved to print out the GB or GiB?
> 

A patchset submitted last year

    https://lists.gnu.org/archive/html/coreutils/2020-09/msg00001.html

would partially address this (for df, du, and ls) by consistently enforcing
the semantics given in Section 2.3 of coreutils.info (8.32): If that patch
were adopted, units suffixed with "B" (e.g. kB, MB, GB, etc.) would always
imply base-2 units, and B-less suffixes (e.g. k, M, G) would always imply
base-10 units, with no exceptions. ("iB" suffixes would not be used.)

However, the overall issue is more complicated than this, because those
semantics in Section 2.3 are directly contradicted by statements appearing
elsewhere in 8.32 coreutils.info that invert the 2.3 semantics. 

See the above posting (and follow-ups in that thread) for all the gory
details and historical background.

NOTE: I do not know whether the program behavior and documentation described
in the above post is still extant in coreutils release 9.

Glenn Golden




This bug report was last modified 3 years and 204 days ago.

Previous Next


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