Ubuntu – Difference between baobab and df/du

disk-usagefilesystem

I have SSD drive.

Baobab shows / uses 34.3 Gb, du -h / last line is 32G /
df shows

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       103G   78G   20G  80% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            3.9G  4.0K  3.9G   1% /dev
tmpfs           789M  1.3M  787M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            3.9G  440K  3.9G   1% /run/shm
none            100M  136K  100M   1% /run/user
/dev/sda1        93M  126K   93M   1% /boot/efi

103G and 78G actually correlate with Disks information: 
111 GB — 26 GB free (76.3% full)

Why the difference between Baobab/du and df is so drastical (40G at 110G SSD)?
How to determine where the space goes and how much space is used actually?

Best Answer

du checks all files and sums them up. It cant get into root-only spaces, so it can't tally all data. Try sudo du.

du measures each file while df reports the free/taken space. It reports everything, but can be thrown off by bad files, missing sectors, etc. It measures the PHYSICAL free space, not the space you can use.

Whenever checking a hard drive, use du.

SRC: Why do "df" and "du" commands show different disk usage?

Related Question