[Toybox] [df] percentage different from GNU df

Roy Tam roytam at gmail.com
Sun Oct 28 20:50:50 PDT 2012


Hello,

I noticed that toybox df shows different percentage from GNU df.
GNU df calculates percentage by used/(used+free) while toybox use
(blocks-free)/blocks.
(which one is better by the way?)

toybox$ ../busybox/busybox df
Filesystem           1K-blocks      Used Available Use% Mounted on
udev                     10240         0     10240   0% /dev
tmpfs                    12456       160     12296   1% /run
/dev/disk/by-uuid/4277274d-e9a1-42ff-a247-b75bde522deb
                       1913244   1151656    664400  63% /
tmpfs                    24912         0     24912   0% /run/shm
toybox$ df
Filesystem                                             1K-blocks
Used Available Use% Mounted on
rootfs                                                   1913244
1151656    664400  64% /
udev                                                       10240
0     10240   0% /dev
tmpfs                                                      12456
160     12296   2% /run
/dev/disk/by-uuid/4277274d-e9a1-42ff-a247-b75bde522deb   1913244
1151656    664400  64% /
tmpfs                                                      24912
0     24912   0% /run/shm
toybox$ ./toybox df
Filesystem      1K-blocks       Used Available Use% Mounted on
tmpfs               24912          0     24912   0% /run/shm
/dev/sda1         1913244    1151656    664400  66% /
tmpfs               12456        160     12296   2% /run
udev                10240          0     10240   0% /dev

Regards,
Roy

 1351482650.0


More information about the Toybox mailing list