the result of "df -h" shows below:

/dev/sda1       5.6G  3.2G  2.2G   60% /
udev            992M  4.0K  992M    1% /dev
tmpfs           401M  752K  401M    1% /run
none            5.0M     0  5.0M    0% /run/lock
none           1002M     0 1002M    0% /run/shm

the result of "du -hs /" shows below:

1.7G    /

Why is that?

  • Is that the full output of du -hs /? When I run it on my computer, I do not have permissions to read many directories. – Sparhawk Jun 1 '13 at 3:37
  • I run it under "sudo su". – Emiya Kiritsugu Jun 1 '13 at 4:03
  • Perhaps this possible dupe? askubuntu.com/a/79996/53508 – Sparhawk Jun 1 '13 at 4:07
  • I am afraid not. That command is to reduce the reverse space of system. but the reverse space is not large to 3.2-1.7=1.5G – Emiya Kiritsugu Jun 1 '13 at 4:21
  • Oh yes, sorry, I misread the other question. Also, there the df used space ≈ du output. – Sparhawk Jun 1 '13 at 4:24

df and du measure two different things....

du reports the space used by files and folders--even this is more than the file size. A few quick experiments on my system show that 4K is a minimum file size in terms of disk space.

df reports the space used by the file system. This includes the overhead for journals and inode tables and such.


Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.