Deleting stuck files

gaomay

macrumors regular
Original poster
May 28, 2002
116
0
Scotland, UK
I know there's a way to delete stuck files using the terminal but I'm not sure of the procedure - can anyone help?

Thanks in advance.
 

Rower_CPU

Moderator emeritus
Oct 5, 2001
11,219
0
San Diego, CA
I'm not sure what you mean by "stuck files", but if you're referring to files that the Trash can't delete, here's how:

Use the command "rm -rf filename" to delete your .Trash file in your user directory. If you need to delete a file you don't own or have write access for, add "sudo" preceding the command: "sudo rm -rf filename"

A word of warning..."rm -rf" is a powerful command that deletes files w/out prompting for confirmation. Make sure you know what you're doing with it, because it's easy to make a mistake and trash the wrong files.

You might also want to check out BatChmod:
http://versiontracker.com/moreinfo.fcgi?id=12057&db=mac

It has a GUI based method of force emptying the trash.
 
Comment

Macette

macrumors 6502
Mar 5, 2002
472
0
Melbourne
Thanks - I've been having this problem too, and have been so sick of the 'full' trash icon...

now i feel clean again.
 
Comment

King Cobra

macrumors 603
Mar 2, 2002
5,403
0
Another technique to use, which doesn't require the Terminal, is using Root User.

This works for a lot of other situations, and has helped me when even the -rm... didn't work.
 
Comment

Rower_CPU

Moderator emeritus
Oct 5, 2001
11,219
0
San Diego, CA
Originally posted by King Cobra
Another technique to use, which doesn't require the Terminal, is using Root User.

This works for a lot of other situations, and has helped me when even the -rm... didn't work.
That's essentially what the "sudo" command does, and avoids the pitfalls of accidentally messing something up when logged in as "root".
 
Comment

kiwi_the_iwik

macrumors 65816
Oct 30, 2001
1,110
0
London, UK
If you have problems/issues in dealing with the Terminal, try the excellent "Pseudo" - downloadable from VersionTracker. It lets you work with the files as administrator: No mess, no fuss - just drag-and-drop on the icon, and you're instantly in "Root".

The other way - boot into OS9, and empty the trash...

;)
 
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.