Where is the trash can for root partition

filesrmtrash

I use trash-put to trash files from command line. Recently, I had aliased my rm command to trash-put so that I don't accidentally delete something important.

However, what happened now was that I had to delete some files from my /var/log folder to free up some space on the / filesystem. I did this using sudo:

sudo rm /var/log/somelog

#Above command is equivalent to: 
sudo trash-put /var/log/somelog

After doing this, there was no free space recovered on the partition since the files must have moved to some trash-can. However, when I checked my trash-can there were no files. I tried to see if there was .Trash-100 folder on the / partition, but even that was not there.

So, where did my trashed file go? And how do I find it so that I can decimate it to recover some space?

Best Answer

Those files you removed may actually still be opened by another process. In that case the file space will become available when that process closes it's handle to the file.

You can lookup these files with lsof:

lsof |grep "var/log"|grep deleted
Related Question