Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

Doug.

share|improve this question

migrated from stackoverflow.com Jun 15 '10 at 2:05

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

6  
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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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