LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What is the command for deleting a directory? (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-the-command-for-deleting-a-directory-539571/)

runnerpaul 03-22-2007 04:31 AM

What is the command for deleting a directory?
 
What is the command for deleting a directory?

syg00 03-22-2007 04:45 AM

Start with "man rmdir" - in need proceed to "man rm".

binary_0011 03-22-2007 05:22 AM

Quote:

Originally Posted by runnerpaul
What is the command for deleting a directory?



rm -r directoryname --force

jerril 03-22-2007 05:55 AM

Similar to binary_0011, but easier to type:

rm -rf directoryname

jer

pixellany 03-22-2007 07:18 AM

rm -rf will remove a directory and its contents without prompting you to be sure that's what you want.

rmdir removes only an empty directory---much safer: clean out the directory, then remove it

mukund_chavan 03-22-2007 08:20 AM

deleting directory
 
Quote:

Originally Posted by runnerpaul
What is the command for deleting a directory?

root# rmdir dir_name --> if directory is empty
root# rm -fr dir_name


All times are GMT -5. The time now is 06:22 PM.