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.

I have a couple of files that I want to delete. So I select them and then do Move to Trash. However, when I do so I get this message:

Some of the items you are moving are in use by another application. Moving the items can cause problems with the application using them. Are you sure you want to move these items?

[Stop] [Continue]

My problem is that I can't find any applications that are using these files. I also tried to run

lsof | grep <part of filename>

But I couldn't see anything there either. What is going on? How can I find out why the file is "locked"? Is there anything similar to the LockHunter or Unlocker applications on Windows?

Note: I realize that I could probably try to just click continue instead of stop, but I'd like to know first and also learn if there is anything I can do. If I override whatever is holding them and deleting them, I won't have a way to test suggested solutions here :p

Note: For others reading this post; I have discovered that I do not have to use grep at all. I can just do lsof <filename>. Probably something most people know, but I didn't :p

share|improve this question
2  
Tried sudo lsof? –  Debilski Mar 2 '10 at 12:33
    
Did now, but didn't get anything then either. –  Svish Mar 2 '10 at 13:14
1  
Not a solution but Snow Leopard is supposed to have better information about why you can't do things with a file –  Peter M Mar 2 '10 at 15:23
    
If we only had Intel... –  Svish Mar 2 '10 at 15:42
add comment

3 Answers

up vote 2 down vote accepted

As Debilski notes, you might consider rerunning your command with sudo.

A likely culprit that I've often found is QuickLook: if you preview a file prior to trashing it there might be a relatively short lock on the file. If that's the case, once the lock is up (or you logout) you should be able to trash the file.

share|improve this answer
    
Is there a way I can "see" if that lock is present or not? And is there a way I can release it without logging out? –  Svish Mar 2 '10 at 13:18
    
Using lsof is the only way to see it. The only way to release it is to quit the process that has the lock (which if it's a background GUI app is achieved by logging out). –  Nerdling Mar 3 '10 at 2:54
add comment

Ok, since lsof isn't working, you could try deep investigation in Activity Monitor and/or Console.

Grab keywords, use search on those, if you find anything also get THOSE keywords and you may be able to google for more info. This should not be a quick process at all, but it's almost guarantee Console will have information about your issue.

I've never had that specific issue before and I've been on mac for less than a year, but that's how I've solved many other similar odd stuff happening in my system.

Also, I've searched on google for your issue, and there seems to be some information out there. Here's one on the X-Lab. Thought it's a little outdated, it might just work. It says basically what's said here in much more details, and give some app links such as TrashIt and Cocktail.

Good luck, and let us know of the results!

share|improve this answer
add comment

If you'd like a GUI, look at WhatsOpen

share|improve this answer
add comment

Your Answer

 
discard

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.