How to find what process is locking a file in Linux

How can I determine what process is locking a file? Is there a filemon for Linux?
eocallaghanAsked:
Who is Participating?
 
omarfaridCommented:
Hi,

Use fuser command. Please see man page:

http://linux.about.com/library/cmd/blcmdl1_fuser.htm
0
 
msklizmantasCommented:
hello,

try to use lsof utility - it will show you open files and who is using them.

best regards,

m
0
 
http:// thevpn.guruCommented:
adding to the previous comment

lsof | grep filename to get the exact entry
0
 
ibu1System AdministratorCommented:
#lsof -n |more
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.