I am using linux deepin 20.02.04 that based on debian 10.10 on my laptop. Some days before, I deleted some files (at least 60GB) from my partition with rm
command. But theirs space didn't free up. Are there any way for solve this?
-
can you please 1. explain more (what is your FS, df, du) etc.... 2. try sync too– francois PDec 10, 2021 at 16:56
-
1Hi @francoisP, I don't know what is your mean of FS? Do you want to know my partition format? it's ext4.– Mohammad Ali AminiDec 10, 2021 at 17:00
-
Please refer askubuntu.com/help/on-topic, Ubuntu and official flavors of Ubuntu (ubuntu.com/download/flavours) are on-topic on this site. The on-topic link provides alternate SE sites for non-Ubuntu OSes.– guivercDec 10, 2021 at 21:10
1 Answer
ok so your are not using a "specific" File system.
On Linux or Unix systems, deleting a file via rm or through a file manager application will unlink the file from the file system's directory structure; however, if the file is still open (in use by a running process) it will still be accessible to this process and will continue to occupy space on disk. Therefore such processes may need to be restarted before that file's space will be cleared up on the filesystem.
you can find process using the files keeping them openned from lsof
for example :
lsof -Fn -Fs | grep -i deleted
Files can also be deleted but scheduled for the real deletion so you have to sync
using the sync
command
of course if you reboot your system, process are stopped & issue deseapper too.
Another point to consider is special files like sockets & logs always appending new datas so file is permanantly getting bigger & bigger for ever until user stop the process that is uselessly written for ever.