jason thurber's weblog

globally-scoped ramblings

Unlocking the contents of your Trashcan – OSX

with 20 comments

If you go to empty the trash in OSX and get a message like:

The operation cannot be completed because the item
filename is locked.

Just open the terminal, cd to ~/.Trash and run the following command:
find . -exec /Developer/Tools/SetFile -a l {} \;

This will (should) recursively unlock all the files in your Trash directory. It’s pretty safe because, well, you’ve already put these files in the trash… what’s the worst that could happen. Depending on your privileges you may need to sudo this.

Found this on the MacFixit Forums.

Written by jthurber

February 4th, 2004 at 8:29 am

Posted in found-on-web