# Trash & Deletion Problems [HELP!]



## gibbs (Jun 25, 2002)

I've got something in my trash, "temporary items" folder that I dragged from a freshly formatted partition. Now, it appears empty but there are invisible files, it wont let me change their permissions to delete, and trash wont empty it.

How do I get into my trash folder via terminal and delete this? Can I?

Any help would be most appreciated by the unix gurus. Thanks.


----------



## gibbs (Jun 25, 2002)

I solved my own prob with a search. [couldnt do it earlier, crashed web browser ;p ] 

Thanks *SO MUCH * to Testuser for this-



> Emptying the Trash - part II
> 
> Here's a more advanced shell script for emptying the trash in Mac OS X. It deletes the stubborn files & folders that refuse to be erased because they are either 1) locked or 2) have incorrect permissions or 3) both. It doesn't have any problems with spaces in the path name, so it should be safe. It can only be run by users who have administrative access.
> 
> ...



THIS WORKS!!!!!!


----------



## gatorparrots (Jul 11, 2002)

If you want to do this from the GUI, there is a permissions utility called BatChmod that has an option to force empty the trash. It's a handy utility to have in your administrative toolbox:

http://www.macchampion.com:16080/arbysoft/

BatChmod is a Cocoa utility written by Renaud Boisjoly for manipulating file and folder privileges in Mac OS X. 

It allows the manipulation of ownership as well as the privileges associated to the Owner, Group or others. 

Here are some of the characteristics of BatChmod: 

*	It allows one to change any specific privilege or ownership without affecting the others
(ie, changing the group without affecting the owner, or adding or removing a specific privilege without affecting all the others). 
*	It can recursively affect enclosed folders. 
*	It can *Force Empty the Trash*, even when it contains locked files! 
*	It's extremely free!


----------



## gatorparrots (Jul 11, 2002)

The short answer is yes, it empties all .Trashes on all volumes for all users.

After choosing "Force Empty Trash" from the BatChmod menu, a warning dialog box comes up that reads "*Are you sure you want to empty the trash?* This will also empty the Trashes on all partitions and is not undoable." The dialog has "Cancel" and "Empty the Trash" buttons. Clicking on the "Empty the Trash" button requires one to authenticate as an administrator.

Their help file lists the following under "Force Emptying the Trash":

_BatChmod offers a "Force Empty Trash" menu when you access from its Dock icon.

This command tries to set the privileges and unlock all of the items in the Trash and then empty the Trash.

The Finder does not always update the Trashe's icon properly, but the Trash should be empty... unless there is some other problem with the files._

So, use it with caution. It would be analogous to holding down the option key while emptying the trash under OS 9... every file, including locked ones, will be deleted.


----------

