Remove directory

RossMAN

Grand Nagus
Feb 24, 2000
78,928
389
136
What's the SSH shell command to remove a directory and all of it's subfolders?

Thanks.
 

JC

Diamond Member
Feb 1, 2000
5,848
68
91
Originally posted by: RossMAN
What's the SSH shell command to remove a directory and all of it's subfolders?

Thanks.


SSH? In DOS, it's 'deltree', if that's any help.
 

RossMAN

Grand Nagus
Feb 24, 2000
78,928
389
136
No it's not in DOS I guess it's considered Unix.

I searched Google and found out it's rmdir but I get an error message stating
"bash-2.05a$ rmdir forums
rmdir: `forums': Directory not empty


Anyway to override that?
 

JC

Diamond Member
Feb 1, 2000
5,848
68
91
Originally posted by: RossMAN
No it's not in DOS I guess it's considered Unix.

I searched Google and found out it's rmdir but I get an error message stating
"bash-2.05a$ rmdir forums
rmdir: `forums': Directory not empty


Anyway to override that?


Sounds just like DOS....deltree would delete even if files still existed. Sorry I can't help you :(
 

AgentEL

Golden Member
Jun 25, 2001
1,327
0
0
if it helps, in UNIX, use "rm -R <dir>"

that will go into the directory itself and delete files and finally delete the directory itself.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: RossMAN
What's the SSH shell command to remove a directory and all of it's subfolders?

Sigh, you'd think with nearly 30k posts you'd figure this isn't an OT post ;)
Bill
 

amnesiac

Lifer
Oct 13, 1999
15,781
1
71
Originally posted by: JC
Originally posted by: RossMAN
No it's not in DOS I guess it's considered Unix.

I searched Google and found out it's rmdir but I get an error message stating
"bash-2.05a$ rmdir forums
rmdir: `forums': Directory not empty


Anyway to override that?


Sounds just like DOS....deltree would delete even if files still existed. Sorry I can't help you :(

It's nothing like DOS. Stop speaking out of your butt. :p

RossMAN, can't you use an FTP client to delete the directory? I think WSFTP will just go through and pulverize all the subdirs of a directory if you want.

As for the SSH, I try not to muck around with that any more than I have to. I'm deathly afraid of screwing something up. :)
 

Derango

Diamond Member
Jan 1, 2002
3,113
1
0
Its not a SSH shell command, you're running bash there, which is a linux shell, so you're looking for the linux command to delete a directory.

And its rm -r <directory name>
 

isasir

Diamond Member
Aug 8, 2000
8,609
0
0
Originally posted by: bsobel
Originally posted by: RossMAN
What's the SSH shell command to remove a directory and all of it's subfolders?

Sigh, you'd think with nearly 30k posts you'd figure this isn't an OT post ;)
Bill


It's RossMAN, he's exempt from such piddly rules.
 

ElFenix

Elite Member
Super Moderator
Mar 20, 2000
102,393
8,552
126
Originally posted by: bsobel
Originally posted by: RossMAN
What's the SSH shell command to remove a directory and all of it's subfolders?

Sigh, you'd think with nearly 30k posts you'd figure this isn't an OT post ;)
Bill

postcount != topicness
 

stars

Golden Member
Feb 27, 2002
1,068
0
0
Hey,

Try rm -rf Directory.

The "f" meaning "Do not prompt for confirmation. Do not write diagnostic messages. Do not produce an error return status if the only errors were nonexisting files.

Hope this helps.
 

yoda291

Diamond Member
Aug 11, 2001
5,079
0
0
rm -rf <directory>

It's also entirely possible you could have already deleted it ross. You just don't know! :p
 

RossMAN

Grand Nagus
Feb 24, 2000
78,928
389
136
rm -rf forums

worked like a charm, thanks!

Where do I find a complete list of commands for n00b's?