Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sahnert

macrumors 6502
Original poster
Oct 20, 2003
498
58
Seattle
Okay so i go to empty trash and get the message that certain items can't be deleted because they are locked. but the things it lists don't show up in trash and the one thing that does show up I go to Get Info to check permissions and whether it's locked. Not locked and permission are all me r&w. So as admin i should be able to delete them right?
is there a way to get rid of these in terminal or anything? Not a terminal guy at all so I don't want to accidently screw something up, but if there is a painless way to get rid of this please clue me in. Thanks.
 

5300cs

macrumors 68000
Nov 24, 2002
1,862
0
japan
Re: trash won't empty. now what?

Originally posted by sahnert
...
is there a way to get rid of these in terminal or anything?

I put a folder in my home directory called 'temp' and put everything in there. Then in Terminal, I do 'cd temp' (no ' s) and in the folder do 'rm *' and it'll erase everything in the folder ( * is a wild card character, rm *.txt will erase any files with the .txt extension, for example.)

Does that help? Since things are in a folder called 'temp' they're away from anything important.
 

Dont Hurt Me

macrumors 603
Dec 21, 2002
6,055
6
Yahooville S.C.
pull it out of the trash click on it and then go up edit or view its one of them and you will find get info. click on get info and then you should be able to unlock it by clicking on a little padlock watchmacallit or check a box that says lock/unlock. hope that helps
 

OutThere

macrumors 603
Dec 19, 2002
5,730
3
NYC
The trash is just a folder with some cool permissions that allows it to delete stuff, and sometimes the trash permissions will get messed up. Try and repair permissions. Hope this helped.
 

sahnert

macrumors 6502
Original poster
Oct 20, 2003
498
58
Seattle
Re: Re: trash won't empty. now what?

Originally posted by 5300cs
I put a folder in my home directory called 'temp' and put everything in there. Then in Terminal, I do 'cd temp' (no ' s) and in the folder do 'rm *' and it'll erase everything in the folder ( * is a wild card character, rm *.txt will erase any files with the .txt extension, for example.)

did that and get the message

rm: [item I want to delete]: is a directory

so can i get rid of a directory?

Haven't tried repairing permissions, though i just did that about 30 minutes before i tried to delete this thing. Maybe I'll try again.

Thanks for all your help
 

sahnert

macrumors 6502
Original poster
Oct 20, 2003
498
58
Seattle
okay i am slowly learning UNIX commands. Found on apple discussions how to delete directory, now I get that it is not allowed. Will sudo rm take care of this? I am in no danger of wiping anything important with sudo as long as I am sure i am in ~/temps right? thanks again.

i've attached a screenshot of my terminal output if you want to take a look
 

Attachments

  • terminal.pdf
    27.6 KB · Views: 109

titaniumducky

macrumors 6502a
Nov 22, 2003
593
0
rm: [item I want to delete]: is a directory

Before the rm command type "sudo" (w/o "s). At the prompt, enter your admin password. This gives you one-action-root-access. Hopefully this will work. However, if it is against RMs nature to delete directories (which I doubt), you'll have to cd into it and delete its contents. This leaves you with an empty directory.
 

5300cs

macrumors 68000
Nov 24, 2002
1,862
0
japan
Originally posted by titaniumducky
Before the rm command type "sudo" (w/o "s). At the prompt, enter your admin password. This gives you one-action-root-access. Hopefully this will work. However, if it is against RMs nature to delete directories (which I doubt), you'll have to cd into it and delete its contents. This leaves you with an empty directory.

rm -rf temp would delete the folder temp, plus all of its contents.

You could also try holding down the option key while emptying the trash. That's a throw back from OS 8 or 7.5 I believe...
 

sahnert

macrumors 6502
Original poster
Oct 20, 2003
498
58
Seattle
thanks all. The sudo rm -rf did it. nice to know that one just in case... although I know i shouldn't be messing around with sudo commands when I don't know squat about UNIX. But with your help I felt confident that I couldn't screw up anything too bad. Thanks again!
 

Hemingray

macrumors 68030
Jan 9, 2002
2,926
37
Ha ha haaa!
For those of you who don't want to dabble in the terminal, there are a few programs that will force empty the trash for you... such as BatChmod and Force Empty Trash. I personally like BatChmod.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.