Linux-command learning-df, linux-command-df
1. the df command is used to view the storage of the file system disk of the Linux server. You can use this command to obtain the disk space and the remaining space.
2. du: displays the disk space used by each file and directory.
3. Difference Between du and df
Du and disk usage calculate the size of each file by searching for the file and accumulate it. The files that du can see only exist and are not deleted. The calculated size is the sum of all the files that he considers to exist.
Df, disk free. You can use the File System to quickly obtain the space size information. When we delete a file, it does not disappear in the file system immediately, instead, it disappears temporarily. When no program is used, deleted files will be released according to OS rules. df records the size of the files obtained through the file system, he is better than du in that he can see the deleted files, and when calculating the size, add this part of space to make it more accurate.
After the file system determines that the file has been deleted, du and df will be consistent.