bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8320: df -BT: rounding error?


From: Voelker, Bernhard
Subject: bug#8320: df -BT: rounding error?
Date: Tue, 22 Mar 2011 16:47:41 +0100

Running `df -B...` with a SIZE which is greater than the total disk space
returns the same value in the 'Used' and 'Available' column - see example
below with T, P and E:

$ for f in 1 K M G T P E Z Y ; do ( set -x && df -B$f . ) ; done
+ df -B1 .
Filesystem           1B-blocks      Used Available Use% Mounted on
D:                   596087726080 100868861952 495218864128  17% /cygdrive/d
+ df -BK .
Filesystem           1K-blocks      Used Available Use% Mounted on
D:                   582116920K 98504748K 483612172K  17% /cygdrive/d
+ df -BM .
Filesystem           1M-blocks      Used Available Use% Mounted on
D:                     568474M    96197M   472278M  17% /cygdrive/d
+ df -BG .
Filesystem           1G-blocks      Used Available Use% Mounted on
D:                        556G       94G      462G  17% /cygdrive/d
+ df -BT .
Filesystem           1T-blocks      Used Available Use% Mounted on
D:                          1T        1T        1T  17% /cygdrive/d
+ df -BP .
Filesystem           1P-blocks      Used Available Use% Mounted on
D:                          1P        1P        1P  17% /cygdrive/d
+ df -BE .
Filesystem           1E-blocks      Used Available Use% Mounted on
D:                          1E        1E        1E  17% /cygdrive/d
+ df -BZ .
df: -B argument `Z' too large
+ df -BY .
df: -B argument `Y' too large

Apart from saying that 1[TPE] is still available ... shouldn't it return
0[TPE] for the "Used" column, as rounding a value of 17% should lead to
zero (mathematically)?

BTW: why are `Z' and `Y' "too large"?

$ df --version
df (GNU coreutils) 8.10
Packaged by Cygwin (8.10-1)

It's on a 32-bit XP.

Have a nice day,
Berny




reply via email to

[Prev in Thread] Current Thread [Next in Thread]