Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do you find out which processes have a lock on a given file, in Linux?

share|improve this question
up vote 7 down vote accepted

In addition to lslk, you could also try lsof.

share|improve this answer

Try fuser

In the example below, I have run fuser against a jar file and it has shown me the pids for the processes using the jar.

$ fuser app.jar

app.jar:    15529m   26293m   23017m
share|improve this answer

You try lslk?

share|improve this answer
lslk is old stuff; for example, it does not appear anymore in newer releases of RHEL than 3. – wzzrd Oct 5 '09 at 11:13
Yeah, lsof was what I was thinking of. But it was already on my Debian Etch box, so go figure. – user17642 Oct 5 '09 at 15:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.