Mano Sriram

lsof linux command

0 minutes (46 words)

lsof command can be used to get the process/pid of a given file (or anything).

lsof ./some_file.txt
kill -9 <pid>

get the pid using lsof and kill the process holding the file. This is not recommended, but it helped me.

Tags: #linux