How can I delete a directory and its files?
I would like to delete a directory and all of its subdirectories and files in one command, can anyone tell me how to do this?
|
rm -rf <directory>
|
When you are root, make sure that there is no space between your slash and the directory:
rm -rf / <directory> or bad things will happen. I'd use rm -rf <TAB> for a list of options. |
great warning :)
what does the f mean? r means to include all subfolders right? |
Don't prompt, in other words, every file would go through and ask you if you are sure, this way, it will just remove it.
|
Quote:
f stands for force |
check out the man pages for more information. at the prompt, type:
man rm |
All times are GMT -5. The time now is 08:01 PM. |