Df-h user-friendly display file system partition information
Note: The directory in Linux is also a file, do not confuse the following directory file to say.
The traditional way to view the file size can be used: ll-h/directory/file name, you can see the size of the file, but if you want to see the size of a directory, using the command: ll-h/directory, can only view the current directory information size, rather than the current directory of all the contents of the total file size occupied. For example: Ll-h/data look at the size of all the files in the data directory, it shows the size of each file and directory inside the directory.
Du/data will count the size of this directory and each of its subdirectory files, and note that the last is how much disk space this data directory file occupies.
Du-h/data humanized Display the size of the data directory, but also the last line is the Data directory summary information
If you want to check the/data directory size, do not want to see the size of all the subdirectory files inside, you can use the-s option
Du-sh/data user-friendly display the size of the data directory, showing only the data directory size, not the size of each directory and file inside it
DF can also count the root partition "/" size, Du-sh/can also count the root partition "/" size, but note: the du command scans each file and counts the size, which is more expensive than using Linux system resources sparingly. However, the results of the two statistics are likely to be inconsistent, usually DF is larger than the results of DU statistics, because:
Linux commands-File system common commands: DF,DU,FSCK,DUMPE2FS