Android discovery partition is increasing, but the size of the file does not increase the reason for finding

Source: Internet
Author: User

File Manager View disk size or DF command find sdcard space constantly increasing


Du command found no increase in file size, etc.



Differences between the Linux du and DF commands



This morning to view disk space, the DF command when viewed: 93%,du command when viewing: 90%. Recall yesterday in the transfer process with FTP, the RM dropped the file, should be the file although indicated on the deleted, but the space is actually not released.


Because Du is different from the DF command implementation: The DU-S command adds up the total number of blocks used by the file system by adding up the number of blocks used by all directories, symbolic links, and files in the specified file system, while the DF command obtains the total number of blocks and remaining blocks by looking at the file system disk block allocation graph. File system allocation Some of the disk blocks used to record some of its own data, such as I node, disk distribution map, indirect blocks, super blocks and so on. This data is not visible to most user-level programs, often referred to as meta data. The du command is a user-level program that does not take meta data into account, while the DF command looks at the file system's disk allocation diagram and considers meta data. The DF command obtains real file system data, while the DU command only looks at parts of the file system.
Therefore, if a user deletes a file in a directory that is open by a running app, the value returned by the du command displays the size of the directory after the file has been subtracted. However, the DF command does not show the size after subtracting the file. Until the running application closes the open file, the value returned by DF shows the file system usage after subtracting the file.


Solution:


#lsof |grep Delete--Find the appropriate process number


#kill <PID>


At this point, using the DF and Du commands, the results are roughly the same.

Android discovery partition is increasing, but the size of the file does not increase the reason for finding

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.