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

3 Answers 3


In addition to lslk, you could also try lsof.


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

You try lslk?

  • lslk is old stuff; for example, it does not appear anymore in newer releases of RHEL than 3.
    – wzzrd
    Oct 5, 2009 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, 2009 at 15:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .