Super User is a question and answer site for computer enthusiasts and power users. 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

Apologies if this has been discussed previously... I did a stack overflow and google search but probably didn't use the right keywords.

Anyway, is there an easy way to determine what files are open on Mac OS X? I had an issue in which I could not unmount a firewire HD until I closed all running apps. Turns out keychain access had a reference to a file on the HD, but it begged the question: how to find out what files are open and what app (or apps) has the file open?

Thanks in advance and again apologies if this has been covered previously.


share|improve this question

migrated from Jun 15 '10 at 2:05

This question came from our site for professional and enthusiast programmers.

The basic answer is lsof. I don't recall if it's installed by default, but it's available via MacPorts if not. – Hank Gay Jun 14 '10 at 20:06
Thanks Hank... it is installed and exactly what I needed. – Doug Jun 14 '10 at 20:11

lsof. I don't recall if it's installed by default, but it's available via MacPorts if not.

share|improve this answer
lsof is installed by default – Chealion Jun 17 '10 at 3:01

Check out WhatsOpen, which is a graphical version of lsof. From the website:

WhatsOpen is a MacOSX utility designed to aid you in determining what is holding your files open. There is a common OSX error when trying to eject removable media relating to files being in use. Often times your files are in use by Spotlight or some other internal system and you don’t even know what program to kill to free up the files and allow the media to eject. This utility makes that a snap. It also provides many other administrative features you may find useful.

share|improve this answer

You must log in to answer this question.