Category Archives: Linux

When Your Linux Disk Isn’t Really Full

If you delete some large log files but the space doesn’t immediately free up, try restarting the service that used those log files. (Or maybe the restart isn’t even necessary. The service might just take a while to clean up itself.)

With lsof +L1 you can see “open” files that were deleted but they’re still stuck in limbo, probably because the service hasn’t been restarted yet.

In the absence of any options, lsof lists all open files belonging to all active processes.

When +L is specified without a following number, all link counts will be listed. When -L is specified (the default), no link counts will be listed.

When +L is followed by a number, only files having a link count less than that number will be listed. (No number may follow -L.) A specification of the form “+L1” will select open files that have been unlinked. A specification of the form “+aL1 ” will select unlinked open files on the specified file system.

You can read more about the problem here.