Noitidart
Noitidart

Reputation: 37318

Identify Process Holding Lock on File

I have a file named parent.control i just create it in my program, its just a text file. Sometimes other processes open and lock this file. I would like to identify which process(es) has locked it. Is this possible? I'm using Ubuntu but looking for a cross *nix solution.

Upvotes: 1

Views: 1257

Answers (1)

chiastic-security
chiastic-security

Reputation: 20520

Try

lsof | grep "parent.control"

or

fuser parent.control

Upvotes: 4

Related Questions