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

idkew

macrumors 68020
Original poster
I am trying to empty my trash on en external drive.

I tried cocktail's for empty- no luck

I tried rm - no luck

I tried rmdir - no luck

here is the prompt of what I get in a rm -R

Code:
CPU:/Volumes/Platter/.Trashes/1026 name$ rm -r  /Volumes/Platter/.Trashes/1026/*
rm: /Volumes/Platter/.Trashes/1026/h/2002/02/08: Directory not empty
rm: /Volumes/Platter/.Trashes/1026/h/2002/02/11: Directory not empty
rm: /Volumes/Platter/.Trashes/1026/h/2002/02/12: Directory not empty
rm: /Volumes/Platter/.Trashes/1026/h/2002/02/13: Directory not empty
rm: /Volumes/Platter/.Trashes/1026/h/2002/02/15: Directory not empty
rm: /Volumes/Platter/.Trashes/1026/h/2002/02/28: Directory not empty
rm: /Volumes/Platter/.Trashes/1026/h/2002/02: Directory not empty
rm: /Volumes/Platter/.Trashes/1026/h/2002/03: Directory not empty
rm: /Volumes/Platter/.Trashes/1026/h/2002: Directory not empty
rm: /Volumes/Platter/.Trashes/1026/h/2003/01/30: Directory not empty
rm: /Volumes/Platter/.Trashes/1026/h/2003/01: Directory not empty
rm: /Volumes/Platter/.Trashes/1026/h/2003: Directory not empty
rm: /Volumes/Platter/.Trashes/1026/h: Directory not empty

any idea what the problem is? it is really annoying.
 
superwoman said:
You should use "sudo rm -rf"

to the OP, CAUTION: this is a very dangerous command, make sure you have backed up before typing, and make sure you are in the correct directory, once you type it, forget the command and move on...:)
 
This is probably NOT the problem, but is something that those not used to unix can often miss.

Remember that, unlike windows, the shell will expand your * before it executes your command. So say the directory you want to empty contains the following files and folders.

Code:
./.hidden file
./.dotdir/1.txt
./.dotdir/2.txt
./file.jpg
./dir/file.doc
./dir/file.ppt

When you run 'sudo rm -rf *' in that directory that expands to 'sudo rm -rf file.jpg dir' but the dotfiles are not matched. The first three files will not be affected by the command. You also generally do not want to run 'sudo rm -rf * .*' since that will generally include '.' and '..' and you probably wanted to keep '..' ;)

When using rm -rf, it is safest to point it at a single directory at a time.

i.e. 'sudo rm -rf .'

B
 
Actually the command you need is:

sudo rm -fr /

:)






NOTE: JUST KIDDING - DON'T DO THIS AS YOU WILL WIPE YOUR HARD DRIVE!!!!!
 
balamw said:
This is probably NOT the problem, but is something that those not used to unix can often miss.

Remember that, unlike windows, the shell will expand your * before it executes your command. So say the directory you want to empty contains the following files and folders.

Code:
./.hidden file
./.dotdir/1.txt
./.dotdir/2.txt
./file.jpg
./dir/file.doc
./dir/file.ppt

When you run 'sudo rm -rf *' in that directory that expands to 'sudo rm -rf file.jpg dir' but the dotfiles are not matched. The first three files will not be affected by the command. You also generally do not want to run 'sudo rm -rf * .*' since that will generally include '.' and '..' and you probably wanted to keep '..' ;)

When using rm -rf, it is safest to point it at a single directory at a time.

i.e. 'sudo rm -rf .'

B

thank you for the 'better' answer, your explanation is very clear and helpful.
 
M-theory said:
thank you for the 'better' answer, your explanation is very clear and helpful.
Note that I really don't think this is the OP's problem, just one that can often create unnecessary confusion, and it is pertinent since various posters included "*" in their solutions.

Personally, I like to use variations like "sudo rm `find . -type f -print`" to wipe out all the files in a folder leaving the folder structure intact.

B
 
balamw said:
Note that I really don't think this is the OP's problem, just one that can often create unnecessary confusion, and it is pertinent since various posters included "*" in their solutions.

Personally, I like to use variations like "sudo rm `find . -type f -print`" to wipe out all the files in a folder leaving the folder structure intact.

B

Again, excellent point, there are great things gained by having a BSD based OS, but also dangers...and yes, the "*" is dangerous.
 
thanks for the replies.

I did try sudo prior to my post. no luck there.

i ran disk utility and found my directory is screwed yet agian. diskwarrior agrees. not fixable.

i think the hardware striped raid is a ppor implimentation on my external drive (2x250gb)

i will backup all i can and reformat with a software raid.

unless there are more ideas.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.