trashing locked items

infinityBBC

Registered
ok... another Q!

the "option-select empty trash" method of deleted locked files in the trash can doesn't seem to work.

is there any new method of quickly deleting these files without unlocking each file?
 
Couple of things that work for me- from the terminal rm -r ~/.Trash/* will do it. after this ocmmand, shift-command-delete will clean up the trash icon.

Or from www.osaxen.com there is a scrpting addition OSX PowerAddons Lite.osax- download and put in the Scripting Additions folder in /users/your-name/Library- the write a script -

Shell "rm -r ~/.Trash/*"

save it as an OS X Applet. Double clicking on it will so the same as running the command in the terminal..

HTH

Craig
 
thanks for your reply, but it didn't work... here's what happened in the terminal:

[dhcppc10:~] bbc% rm -r ~/.Trash/
override rwxrwxrwx bbc/staff for /Users/bbc/.Trash/AppleWorks 6 copy.app/AppleWorks 6? y
rm: /Users/bbc/.Trash/AppleWorks 6 copy.app/AppleWorks 6: Operation not permitted
override rwxrwxrwx bbc/staff for /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents/MacOS/AppleWorks Essentials? y
rm: /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents/MacOS/AppleWorks Essentials: Operation not permitted
override rwxrwxrwx bbc/staff for /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents/MacOS/Clippings? y
rm: /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents/MacOS/Clippings: Operation not permitted
override rwxrwxrwx bbc/staff for /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents/MacOS/Starting Points? y
rm: /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents/MacOS/Starting Points: Operation not permitted
rm: /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents/MacOS: Directory not empty
override rwxrwxrwx bbc/staff for /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents/MacOSClassic/AppleWorks Essentials? y
rm: /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents/MacOSClassic/AppleWorks Essentials: Operation not permitted
override rwxrwxrwx bbc/staff for /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents/MacOSClassic/Clippings? y
rm: /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents/MacOSClassic/Clippings: Operation not permitted
override rwxrwxrwx bbc/staff for /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents/MacOSClassic/Starting Points? y
rm: /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents/MacOSClassic/Starting Points: Operation not permitted
rm: /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents/MacOSClassic: Directory not empty
rm: /Users/bbc/.Trash/AppleWorks 6 copy.app/Contents: Directory not empty
rm: /Users/bbc/.Trash/AppleWorks 6 copy.app: Directory not empty
override rwxrwxrwx bbc/staff for /Users/bbc/.Trash/AppleWorks 6.2.app/AppleWorks 6? y
rm: /Users/bbc/.Trash/AppleWorks 6.2.app/AppleWorks 6: Operation not permitted
override rwxrwxrwx bbc/staff for /Users/bbc/.Trash/AppleWorks 6.2.app/Contents/MacOS/AppleWorks Essentials? y
rm: /Users/bbc/.Trash/AppleWorks 6.2.app/Contents/MacOS/AppleWorks Essentials: Operation not permitted
override rwxrwxrwx bbc/staff for /Users/bbc/.Trash/AppleWorks 6.2.app/Contents/MacOS/Clippings? y
rm: /Users/bbc/.Trash/AppleWorks 6.2.app/Contents/MacOS/Clippings: Operation not permitted
override rwxrwxrwx bbc/staff for /Users/bbc/.Trash/AppleWorks 6.2.app/Contents/MacOS/Starting Points? y
rm: /Users/bbc/.Trash/AppleWorks 6.2.app/Contents/MacOS/Starting Points: Operation not permitted
rm: /Users/bbc/.Trash/AppleWorks 6.2.app/Contents/MacOS: Directory not empty
override rwxrwxrwx bbc/staff for /Users/bbc/.Trash/AppleWorks 6.2.app/Contents/MacOSClassic/AppleWorks Essentials? y
rm: /Users/bbc/.Trash/AppleWorks 6.2.app/Contents/MacOSClassic/AppleWorks Essentials: Operation not permitted
override rwxrwxrwx bbc/staff for /Users/bbc/.Trash/AppleWorks 6.2.app/Contents/MacOSClassic/Clippings? y
rm: /Users/bbc/.Trash/AppleWorks 6.2.app/Contents/MacOSClassic/Clippings: Operation not permitted
override rwxrwxrwx bbc/staff for /Users/bbc/.Trash/AppleWorks 6.2.app/Contents/MacOSClassic/Starting Points? y
rm: /Users/bbc/.Trash/AppleWorks 6.2.app/Contents/MacOSClassic/Starting Points: Operation not permitted
rm: /Users/bbc/.Trash/AppleWorks 6.2.app/Contents/MacOSClassic: Directory not empty
rm: /Users/bbc/.Trash/AppleWorks 6.2.app/Contents: Directory not empty
rm: /Users/bbc/.Trash/AppleWorks 6.2.app: Directory not empty
rm: /Users/bbc/.Trash: Directory not empty
[dhcppc10:~] bbc%
 
You've run into the (getting infamous) immutable flag problem; run

chflags -R nouchg ~/.Trash

then try your rm again.
 
you caould also recursively chmod the directories by doing a get infor on the folder in the Finder (command + i), go tp the permissions pane and change the permissions to drw-rw-rw- and make sure the check bo to copy the permissions...

you may also be able to force it from tghe CLI with

cd ~/.Trash/
sudo rm -rf *

-Jason
 
You've run into the (getting infamous) immutable flag problem; run

chflags -R nouchg ~/.Trash

then try your rm again.

I could have missed something here, but with full root "rm -fr /Volume/frakkedHD/.Trashes" should work, but it doesn't.

The chflags was a nice idea, but I still get "Operation not permitted" for thousands of files. GORRAM APPLE!!! :-(
What have they secretly done behind my back THIS time???

It would appear that the ONLY viable solution is to REFORMAT the drive. As this is my backup drive, that's not a very nice thing to require. If my primary HD goes down during the reformat then I've lost 1TB+ of data.

Time Machine is definitely Not Ready For Prime Time. :-(

We need a ROBUST OS, and a ROBUST backup solution, not more crap from Apple. I've been slowly approaching utterly infuriated with Apple for decades now. The last time any of their stuff "just worked" was circa 1984.

Unix *should* have given us the tools to solve OSX insanity, alas, OSX seems to be the master behind the curtain, leaving even full root helpless.
 
Eh?

This post is almost 10 years old.

Mac OS X has changed drastically in that time -- what was written before may not apply today.

Please state your specific problem, and we'll help the best we can with rectifying it. I highly doubt that a complete reformat and reinstall is necessary. It sounds like you're having trouble with Time Machine, but Time Machine didn't exist at the time this post was written -- perhaps the solutions offered here don't apply to your situation.

Elaborate on what you're experiencing, and we'll do our best to sort it out.
 
Back
Top