Paul - The Programmer

simple & stupid
redirect stderr to stdout
Colorific Man Page

The differences of df and du

paul posted @ Tue, 29 Dec 2009 01:22:30 +0800 in linux , 1340 readers
  • df:
  1. df gets most of its information from the filesystem's primary superblock.
  2. df calulates the space used by the open files and the inodes.
  3. Check the open file size with "lsof -s <filesystem name> ".
  4. Check the used inode with "df -i".
  • du:
  1. du calculates the exatly size reported by the files on the filesystem. 
  2. du does not count the inodes and the open files.
  3. The block size setting does not effect du's calculation.

df is preciser for the logical used amount of filesystem. As well as du is good at reflecting the use of filesystem from the physical point of view.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
  • No match
  • No match

Login *


loading captcha image...
(type the code from the image)
or Ctrl+Enter