Click to See Complete Forum and Search --> : command line switch to delete non-empty dir


J-Tek
11-20-2001, 03:01 AM
Hey,

What's the rm switch to remove a directory that's not empty?

scanez
11-20-2001, 03:11 AM
rm -r directory_name

the -r flag means recursive, as can be seen from "man rm"

Have fun
SC

J-Tek
11-20-2001, 03:23 AM
yea,

but it asks if I want to descend into EVERY directory... It gets annoying after a while.

is there a better way.

mv dir_name 2Trash?

where's the Trash_Dir?

camelrider
11-20-2001, 03:34 AM
rm -rf

Be careful!

For more information:
man rm

dvdnut
11-20-2001, 06:33 AM
aye

rm -rf <dir name>

will work, but only if the user created the directory and subsequent files

else root will need to do it.

aye also be careful as it wont prompt you to say yes with the f switch