Thursday, June 25, 2009

Freeing disk space

This is just an FYI to anyone who is deleting files off their hard drive and it's probably a pretty familiar concept to those who've been using Linux for awhile.

For any file, Linux maintains a list of handles, that is programs that are currently using the file. When you delete the file, it is only removed from the disk when the number of handles goes to zero.

This becomes important if your drive is almost full and you delete a file, but you find that your disk space has not changed. The most likely reason is that some program still has an open handle.

Make sure that any program that might be using the program is closed and if all else fails, a reboot will clear all of the open file handles.

And if you weren't already aware, the command line tool to find out how much disk space you have left is 'df'.

No comments:

Post a Comment