Remove / Delete Directory and Its Contents in Linux

February 20, 2008

(Note: Please see my latest posts at my new blog!)

rm -rf <DirectoryName>

This command will remove a directory and its contents without prompting you to make sure you want to delete each file in the directory. Substitute <DirectoryName> with the actual directory name.

Entry Filed under: Linux. .

5 Comments Add your own

  • 1. shailesh  |  September 11, 2008 at 6:26 am

    Thanks.

  • 2. Adel  |  April 7, 2009 at 6:53 pm

    Thanks a lot

  • 3. NEWB  |  June 24, 2009 at 2:04 am

    to remove everything in a directory:

    rm -rf *

  • 4. syam prasad  |  October 8, 2009 at 6:04 am

    Very good useful information.

  • 5. abbaby  |  October 31, 2009 at 8:41 pm

    thx

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Categories

Archives

Top Posts