Ubuntu – Different value for free space in GUI and df -kh

command linedisk-usagehard drivenautilus

If I look at "properties" under /home/user/Desktop in the GUI (nautilus), it shows free space as 137.3 GB. However, if I execute df . -kh it shows 128 GB available.

Why are these different? Which one should I believe if I need the exact free space of PWD?

Best Answer

One program is showing the free space in decimal (10^9) gigabyes (GB), the other is showing it in binary (2^30) gigabytes (GiB); 128 GiB = 137.4 GB. For df you can specify whether you want decimal or binary units:

$ df -h . # -h requests binary units
Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/Serverax-Home  9.3G  420M  8.4G   5% /home

$ df -H . # -H requests decimal units
Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/Serverax-Home   10G  440M  9.0G   5% /home

See man df for details.

Related Question