The difference is as follows:
(Recommended tutorial:linux tutorial)
du command displays the size of the directory or file.
df Displays information about the file system where each
The file system allocates some of the disk blocks to record some of its own data, such as i nodes, disk distribution maps, indirect blocks, super blocks, etc. This data is invisible to most user-level programs and is often called Meta Data.
The du command is a user-level program that does not consider Meta Data, while the df command looks at the disk allocation map of the file system and considers Meta Data.
The df command obtains the real file system data, while the du command only views part of the file system.
The above is the detailed content of What is the difference between du and df in linux?. For more information, please follow other related articles on the PHP Chinese website!