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