Click to See Complete Forum and Search --> : very newb question... maybe and I did RTFM


airedale
02-11-2001, 02:57 PM
I have been looking around on how to delete a directory

I know the rm command, but if there are files in the directory I would like to be able to just delete the whole directory along with the files. Could someone help me out?

Thanks :)

flintstone
02-11-2001, 03:14 PM
wow!! something I can answer :D
use rm -r directoryname (r stands for recursive)

aph3x
02-11-2001, 04:33 PM
use rm -rf [dirname] to do it recusively without being prompted for file deletion confirmation

note: be careful using this command... issuing rm -rf / as root will wipe your entire / filesystem!

flintstone
02-11-2001, 04:37 PM
damn, he has to come up with a better answer. :rolleyes:

flintstone
02-11-2001, 04:39 PM
check out man rm, that gives the complete options that can be used with rm.

I did this post to qualify for the grasshopper..how greedy can one get?? :D

aph3x
02-11-2001, 08:01 PM
i woudnt necessarily say its a better answer... unless you like being prompted for file deletion in every directory that is removed. :)

airedale
02-12-2001, 03:33 PM
Thank you all for the answers! I will now go use them to clean up my box!

Airedale :D