"Go" linux delete file does not free space issue processing

Source: Internet
Author: User
Tags disk usage

After the files in Linux are deleted, the space is not released because in the Linux system, deleting files via RM or File Manager will be unlinked from the directory structure of the filesystem (unlink). However, if the file is open (there is a process in use), The process will still be able to read the file, and disk space is always occupied.
Workaround:
1, first DF-LH check the disk usage status
2. Locate the partition where the deleted file is located, eg.opt partition
3. View all files that have been deleted: Lsof-n/opt |grep deleted
The results are as follows: [[email protected],nicx.cn]# lsof-n/opt |grep Delete
SendMail 12342 root 5r REG 104,6 8214888448 786452/var/log/hello.log (Deleted)
4. Kill 8195
5, then run lsof-n/opt |grep Delete, should not have the above results.
6, re-run DF-LH to see if the space has been released?

"Turn" http://blog.csdn.net/donghustone/article/details/7085240

"Go" linux delete file does not free space issue processing

Related Article

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.