Find and remove large files that are open but have been deleted
172
votes
4
answers
403030
views
How does one find large files that have been deleted but are still open in an application? How can one remove such a file, even though a process has it open?
The situation is that we are running a process that is filling up a log file at a terrific rate. I know the reason, and I can fix it. Until then, I would like to rm or empty the log file without shutting down the process.
Simply doing
rm output.log
removes only references to the file, but it continues to occupy space on disk until the process is terminated. Worse: after rm
ing I now have no way to find where the file is or how big it is! Is there any way to find the file, and possibly empty it, even though it is still open in another process?
I specifically refer to Linux-based operating systems such as Debian or RHEL.
Asked by dotancohen
(16493 rep)
Mar 20, 2013, 07:31 AM
Last activity: Nov 12, 2023, 03:33 PM
Last activity: Nov 12, 2023, 03:33 PM