Free up space hogged by application in UNIX

Hey, what do we have a here? The df command says that our filesystem is 100% but after thorough examination you see that the filesystem is almost empty. This is caused by applications (most of the times poorly coded) which are still hogging the space that was originally used by the deleted file.

To check on those pesky applications that are still hogging the filesystem, give this command a try:

root@solaris# find /proc/*/fd -type f -links 0 -exec ls -l {} \;

This will give the list of files and their respective sizes:


The “9876” is the Process ID (PID) and the “5432” is the file descriptor for the file the PID opened. They are already none existent on our current filesystem but will not be released until to process closes it – or dies.

To check on this PID:

root@solaris# ps -ef | grep 9876

To release these precious filesystem space either let the application team bounce their application or kill this problematic PID:

root@solaris# kill 9876

There you have it!!! You have successfully regained your lost free filesystem space.

See you on my next note!!!