df -h showing wrong output in GB
- by Anurag Uniyal
If I list df output for KB, MB and GB, they do not match e.g.
$ df -k |grep xvdb
/dev/xvdb1 12796048 732812 11413172 7% /xxx
$ df -m |grep xvdb
/dev/xvdb1 12497 716 11146 7% /xxx
$ df -h |grep xvdb
/dev/xvdb1 13G 716M 11G 7% /xxx
12796048 KB = 12496.14 MB so that is slight off but OK
12796048 KB = 12.2 GB, 12407 MB is also 12.2 GB
so why df is showing 13 GB or am I missing something?
Here is full df listing
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.5G 1.7G 5.5G 24% /
none 5.8G 128K 5.8G 1% /dev
none 5.8G 0 5.8G 0% /dev/shm
none 5.8G 44K 5.8G 1% /var/run
none 5.8G 0 5.8G 0% /var/lock
none 5.8G 0 5.8G 0% /lib/init/rw
/dev/xvdb1 13G 716M 11G 6% /xxx
Coreutils version seems to 7.4 as info coreutils shows
This manual documents version 7.4 of the GNU core utilities,