Re: OS X Trash removal via terminal

From: Lucas Rockwell <lr_at_socrates.berkeley.edu>
Date: Fri Jan 23 2004 - 13:50:23 PST

Michael,

Try this instead (of course, don't type the % sign):

% cd /Users/rimar/.Trash/

% sudo rm -ri <name of file you want to remove>

That is the safest way to do it, and it should work fine (but will take
forever if there is a bunch of stuff in your trash). If not, then
maybe you could change the permissions on the files first (once you've
cd'd to the .Trash/ -- repeating it here just so there are no mistakes):

% cd /Users/rimar/.Trash/

% sudo chmod -R 777 *

% sudo rm -ri *

Of course, you NEVER what to execute the above command from the root of
your home directory (~) as you WILL REMOVE EVERYTHING in your home
directory if you do (although, the "i" option helps to stop disasters).
Same goes for anywhere else on the computer. If you are inside the
.Trash/ directory and you execute it, you are ok.

ALWAYS exercice extreme caution when using sudo rm -r. In fact, try to
only use it when you are in your ~/.Trash/ directory!

-lucas

On Fri, 23 Jan 2004, Michael Rimar wrote:

> TrashIt! gets me into a loop of saying that the admin password stored
> is no longer valid and asks for the password again and again, nothing
> left the trash and the loop didn't end (or I didn't have the
> patience)...The installer is in the trash now, too...
>
>
> At 12:16 PM -0800 1/23/04, Aron Roberts wrote:
> >Hi Michael,
> >
> > At 12:01 -0800 2004-01-23, Michael Rimar wrote (with permission
> >given to respond to the MAGNet list):
> >>Well, maybe we're getting closer..
> >>
> >>it says no such file
> >>
> >>Last login: Thu Jan 22 12:35:18 on ttyp1
> >>Welcome to Darwin!
> >>[c-1749-3-3:~] rimar% sudo rm -ri /Users/rimar/Trashes
> >>Password:
> >>rm: /Users/rimar/Trashes: No such file or directory
> >>[c-1749-3-3:~] rimar%
> >>
> >>
> >>I thought this was the correct location for the trash file..
> >
> > The Trash is in a directory named ".Trash". This directory is
> >hidden in the Finder and in ordinary directory listings by virtue of
> >having a dot as the first character in its name; E.g.:
> >
> > /Users/rimar/.Trash
> >
> > For you and others encountering this situation: as one possible
> >alternative to using Unix shell commands, you might also look at
> >Randy Singer's guide's suggestions about force-emptying the trash,
> >mentioned in a previous note. Among its suggestions is a pointer to
> >a free AppleScript script called "Trash-It!". Here's the direct
> >link to that script:
> >
> ><http://www.nonamescriptware.com/forums/index.php?&act=Downloads&CODE=02&id=7>
> >
> > This little script has received great reviews on VersionTracker's
> >download page from most users who've posted comments there:
> >
> ><http://www.versiontracker.com/dyn/moreinfo/macosx/14884&mode=feedback&vid=All>
> >
> >Aron Roberts
> >Workstation Software Support Group
>
>
> --
> ------------------------------
> Michael Rimar
> Administrative Assistant
> UC Botanical Garden
> 200 Centennial Drive #5045
> Berkeley, CA 94720-5045
> (510) 642-0849
> fax (510) 642-3012
> http://botanicalgarden.berkeley.edu
> ------------------------------
>
> "There's no bad weather, only the wrong clothes"
> Scottish fisherman's proverb

------------------------------------------------------------------------
The following was automatically added to this message by the list server:

For information about MAGNet, its meetings and events, and its
mailing list, including information on subscribing and unsubscribing,
see the MAGNet Web site at <http://magnet.berkeley.edu/>.
Received on Fri Jan 23 13:50:56 2004

This archive was generated by hypermail 2.1.8 : Fri Jan 23 2004 - 13:50:56 PST