[X4U] Re: Terminal | Emptying the trash

Timothy Luoma lists at tntluoma.com
Thu Mar 17 13:30:53 PST 2005


On Mar 17, 2005, at 2:17 PM, Randy B.Singer wrote:

> If there are several locked files in the Trash, you can unlock them all
> at the same time in Terminal. Follow these steps:
>
>    1. Open Terminal.
>       Type: chflags -R nouchg
>       Note: Type one space (not pictured) after nouchg in the line 
> above,
> so that it ends in "nouchg ". Do not press Return yet.
>    2. Double-click the Trash icon in the Dock to reveal the contents of
> the Trash. If necessary, arrange the Finder window so that a portion of
> the Terminal window is still visible.
>    3. Press the Command-A key combination to select all files in the
> Trash.
>    4. Drag the files from the Trash to the Terminal window.
>       Note: This automatically enters the pathname for each file. This
> eliminates the need to individually empty multiple Trash directories,
> particularly when multiple disks or volumes are present.
>    5. Press Return. No special text message will be shown indicating 
> that
> the command was successful.
>    6. Empty the Trash.

There's an easier Unixy way to do this

1) Open Terminal

2) paste this line

		find ~/.Trash -exec chflags -R nouchg { } \;

	# which says "Goto ~/.Trash/ and run the command 'chflags -R nouchg' 
on everything in it

3) then paste this line

		find ~/.Trash -exec rm -f {} \;

	# which says "Goto ~/.Trash and delete everything in it

TJL



More information about the X4U mailing list