Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

EricVT

macrumors member
Original poster
Feb 19, 2008
64
0
I have some files in the trash that I'm trying to empty, but OSX keeps telling me they are in use. They are video files that I made in Quicktime, and I've quit any program that is running that I would associate with video files.

How can I tell where these files are being used so I can get rid of them?
 

atluten

macrumors 6502
Mar 24, 2008
263
0
I've encountered this problem a few times and have found these two methods useful. You can try either or. A few times I've had luck in identifying some processes that may have some links to the video file by using activity monitor and killing that process, but I have to admit it's more trial-and-error. Best of luck.

1. Log out and log back in, then try deleting the files.
2. Use the "Secure Empty Trash" option in the Finder menu.
 

mstens

macrumors member
Mar 13, 2008
52
0
in terminal you can also do the following:

$ lsof | grep <filename>

It'll show you plenty of information about it. The first word will be the process name that is using it.

For example:
Code:
mike-macbook-pro:~ mike$ lsof | grep -i 'iTunes Library'
iTunes    6945 mike   14u     REG       14,2  15958222    2056175 /Users/mike/Music/iTunes/iTunes Library

You can also do lsof /path/to/file
like this:
Code:
mike-macbook-pro:~ mike$ lsof '/Users/mike/Music/iTunes/iTunes Library'
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF    NODE NAME
iTunes  6945 mike   14u   REG   14,2 15958222 2056175 /Users/mike/Music/iTunes/iTunes Library
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.