How many times have you tried to unmount a hard disk or memory card, or empty the Trash, only to be told that a file is in use by an application? It’s happened to me a few times. Unfortunately Mac OS doesn’t tell you exactly which application is using the file, which can make it tough to track down the problem.
One way out is to logout or reboot the Mac to clear the file lock, but there is a less drastic solution. What’s Keeping Me? is a handy little app that lets you search for an open file (you can also search for a disk name to find all open files on a mounted disk). It then tells you which app or process is using the file(s). For best results select the As Administrator option to find all files.
Now the more observant/tech-savvy amongst you have probably spotted that this is remarkably similar to opening a Terminal window and typing:
sudo lsof | grep -i <filename>
And you’d be right. Still, What’s Keeping Me? is more user-friendly – especially for those who tend to approach the command line brandishing crosses and waving garlic – and it conveniently allows you to quit or kill the offending app at the click of a button. Plus it’s only 5 bucks (voluntary donation) so you can’t go too wrong. And it has a cute icon.
By the way, here’s a quick tip. If you ever need to do the opposite – that is, find out which files an app is using – fire up Activity Monitor, select the process in the list, then hit Command-I to inspect it. You can then click Open Files and Ports to view a list of files being used by that app.