Linked by Thom Holwerda on Sun 8th Jan 2006 21:31 UTC
Thread beginning with comment 83428
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: Amazing how many reasonable people...
by jziegler on Mon 9th Jan 2006 13:10
in reply to "RE[2]: Amazing how many reasonable people..."
Well, on Linux (and I guess other Unixes as well), you _can_ delete a file that is in use.
The thing is, only the directory entry will be deleted. The inode and the file "behind" it will continue exists, until all handles to that inode are closed. At that moment, the file itself will disappear as well.
However, you are right about lsof. fuser might be even better, in some cases. I like it for checking TCP ports in use.




Member since:
2006-01-09
there should be a way to find out what process is making a file "busy" (Windows has major problems with that too.)
On Windows you can use this tool:
http://ccollomb.free.fr/unlocker/
It will tell you which process is using a particular file, and let you kill the file handle or the whole process.
On Linux, you can use lsof to get the PID of the offending application and then kill it so that you can release the resource being held by it.