Fun with Unix and sticky network trash

Terminal is opened infrequently on this machine. I know enough Unix to be dangerous, but sometimes it’s the only way to deal with sticky file issues. Sometimes I use it to open an old Stuffit file that the latest version of Stuffit won’t touch, but today I needed to get rid of trashed files on external drives and restore my sanity.

If you get an error message like this:
Trasherror
and no amount of permissions fixes, reboots, or waving dead chickens about has helped, then you need to get freaky in the Terminal application.

After a bit of digging for how to delete the un-deleteable, I finally found the magic Google search word combination to yield a useful lead. Deleting stuff off your own volume is fairly straightforward; deleting stuff off of your external drives is trickier information to obtain. (Goodness knows why- it’s really pretty simple.)

First, make sure the stubborn files are in the Trash. Try to delete them by File > Empty Trash. Nothing? OK, proceed to launch Terminal and follow my lead. (Disclaimer: This is a tip I’ve used but I’m not responsible if you delete the wrong files or get lost in Terminal… you’re a big kid now, you’re responsible for your own mess.)

Open the Trash in Finder. Spin open any folders or whatever so you can see the sticky file. You’ll need to be able to drag and drop it to terminal after entering the following code.

Type in:
sudo rm -R
(Take care that there is a space after the -R)

Drag the target file icon from the Trash window to after the space character in Terminal. Terminal will fill in all the freaky path jargon. Press Return. It should pause and then bring up a new prompt as shown in the next picture here: *
Terminal Trash

Glance back at the Trash window and marvel at the lack of sticky network file in your Trash.
Rinse and repeat as necessary.

Hope this helps. This tip has certainly given me back a bit sanity this morning! 😀

smooches~
jEN

*You may be prompted to enter a password after hitting Return. This is your Admin password. Enter it and hit Return to continue with the command.

Technorati Tags: , , ,