1

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?

2 Answers 2

3

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?

1
  • 1
    I checked with lsof | grep '(deleted)' | wc , it gave me 702 newlines. When I restarted the system I got 40G of free space back.
    – peroksid
    Dec 26, 2013 at 7:50
2

du: Displays the file system block usage for each file argument and for each directory in the file hierarchy rooted in each directory argument.ManPage

df: Displays free disk space, With no arguments, df reports the space used and available on all currently mounted filesystems (of all types). Otherwise, df reports on the filesystem containing each argument file. Normally the disk space is printed in units of 1024 bytes.ManPage

Disk Usage Analyzer (baobab), is an application which shows you your use of storage space using graphs. Disk Usage Analyzer will display sizes in the directory tree as allocated space. This means that the displayed sizes refer to the actual disk usage and not to the apparent directory size.

baobab will not count /proc, or any file size that is not related to a plain file, so symlinks, character blocks, device blocks will not be part of the directory size.Gnome

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .