Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rm not freeing diskspace [closed]

I've rm'ed a 2.5gb log file - but it doesn't seemed to have freed any space.

I did:

rm /opt/tomcat/logs/catalina.out 

then this:

df -hT 

and df reported my /opt mount still at 100% used.

Any suggestions?

like image 489
chickeninabiscuit Avatar asked Dec 01 '08 23:12

chickeninabiscuit


People also ask

Why is space not being freed from disk after deleting a file?

Available disk spaces does not increase after deleting files on an external drive. When a file is deleted, the space used on the disk is not reclaimed until the file is truly erased. The trash (recycle bin on Windows) is actually a hidden folder located in each hard drive.

Does rm actually delete the file?

Does rm Delete a File? Actually, the rm command never delete a file, instead it unlinks from the disk, but the data is still on th disk and can be recovered using tools such as PhotoRec, Scalpel or Foremost.


1 Answers

Restart tomcat, if the file is in use and you remove it, the space becomes available when that process finishes.

like image 184
FerranB Avatar answered Sep 22 '22 12:09

FerranB