I'm working on a Linux (Scientific Linux CERN SLC release 6.9 (Carbon))
machine on which I am unable to install programs and on which the lsof
or fuser
commands are not available.
I'm trying to remove an NFS dotfile on this machine but I keep getting the Device or resource busy
error so I'd like to find out which process (I suspect it might be one I have previously started with nohup
) still has a file descriptor to this file.
How can I achieve this?
Best Answer
Use
/proc/<PID>/fd
.Example....we want to figure out which pid has
/var/log/audit/audit.log
open.fuser
tells us it's pid 255.So using a non
fuser
solution: