The differences of df and du
paul
posted @ Tue, 29 Dec 2009 01:22:30 +0800
in linux
, 1339 readers
- df:
- df gets most of its information from the filesystem's primary superblock.
- df calulates the space used by the open files and the inodes.
- Check the open file size with "lsof -s <filesystem name> ".
- Check the used inode with "df -i".
- du:
- du calculates the exatly size reported by the files on the filesystem.
- du does not count the inodes and the open files.
- 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.
This work is licensed under a Creative Commons Attribution 3.0 Unported License.