faqts : Computers : Operating Systems : Linux

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

61 of 68 people (90%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

Linux: File: Directory: Operation: Delete: What is the equivalent of MSDOS 'deltree' in Linux? [rm]

May 27th, 2006 18:34
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 19 September 2003 - 11:55 am ------------------

Linux: File: Directory: Operation: Delete: What is the equivalent of 
MSDOS 'deltree' in Linux? [rm]

To remove a directory and all its subdirectories you can type:

 1. -With asking if you want to delete

       rm -R dirname/

        E.g.

         rm -R /home/mydirectory/

       ---

       then answer 'y' to all requests to remove the
       subdirectories.

 2. -Without asking if you want to delete
     (use with caution, as it will remove without
      confirmation)

       rm -RF dirname/

        E.g.

         rm -RF /mydirectory/

          (use with caution, as it will remove without
           confirmation)

----------------------------------------------------------------------