Found a user's computer, DF check out/disk space occupied 16G, than with du view to get more disk space, du view/under All program directory add up to less than 5G. What is the reason for this?
Even if there is a hidden file, check it is very small ah. Because DF and du do not have the same statistical mechanism. Du will count all files, directories, and directories under the specified directory. is based on the fact that the file system can see that there are indeed such a number of documents. This means that the files that we can see in the file system will be counted by DU. DF (DF command draws the total number of blocks and remaining blocks by looking at the file system disk block allocation graph. ): This is about the way the program writes a file, a process that writes something to a file, then gets a pointer, and then writes to the file (the disk area) to which the pointer is pointing. If for some reason (or possibly artificially) the file being pointed to has been deleted, but (write call) does not know whether the file is still in, it will continue to write to it, regardless of whether the file exists, disk block or write operation use. Therefore, because the file does not have, so du statistics are not written to these disk blocks, but because the process is still written, disk space is not released, so DF can be counted, so DF statistics is much larger than the results of DU. How to solve it? 1. Stop the program on the system. 2. If it doesn't work, unmount the file system. 3. Rebooting the system
Differences between DF and DU commands in Linux systems