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

I know I can use lsof path/to/file to see which processes currently have a given file open.

Is there a top-like command I can use to continuously monitor which processes have a given file open?

share|improve this question
up vote 3 down vote accepted

Instead of lsof, I would suggest using fuser(1), especially since you say you want to watch for processes, and not ports or users or anything else.

share|improve this answer

Take a look the +|-r option for repeat mode:

$ lsof -r 1 path/to/file

You can also use the watch command:

$ watch -n 1 'lsof path/to/file'
share|improve this answer

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.