Find the answer to your Linux question:
Results 1 to 8 of 8
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Location
    Venezuela
    Posts
    60

    A Command Newbie question...


    Hi ...I want to delete a Directory taht have A LOT of file in it...so I try by doing... "rm -r directory"

    this does what i want to do but it ask me for abery single file if im sure that i want to delete it...so I'll be saying "Yes" all the day...

    How do i delete all the directory whit the file in it....

  2. #2
    Linux Guru
    Join Date
    Mar 2003
    Location
    Wisconsin
    Posts
    1,907
    rm -rf dir
    Registered Linux user #346571
    "All The Dude ever wanted was his rug back" - The Dude

  3. #3
    Linux Guru fingal's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham - UK
    Posts
    1,539
    Try doing rm -rf directory. The 'f' stands for 'force'. I did this last night on my Xine skins. It's a long story
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Use this instead:
    Code:
    rm -Rf directoryname
    The "f" or FORCE switch says, "Don't ask questions, just do it." NOTE: Be VERY careful using the rm -Rf command as root user.

    EDIT: Haha. Well, looks like great minds think alike. If you didn't get what you needed the first 3 times, I guess we can't help you.
    Registered Linux user #270181

  6. #5
    Linux Guru fingal's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham - UK
    Posts
    1,539
    Quote Originally Posted by jeremy1701
    rm -rf dir
    Sorry - we posted simultaneously
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso

  7. #6
    Linux Guru
    Join Date
    Mar 2003
    Location
    Wisconsin
    Posts
    1,907
    Quote Originally Posted by fingal
    Sorry - we posted simultaneously
    No worries! It's weird though when you see posts with the exact same time.



    Jeremy
    Registered Linux user #346571
    "All The Dude ever wanted was his rug back" - The Dude

  8. #7
    Linux Engineer
    Join Date
    Mar 2005
    Posts
    1,431
    [quote="jeremy1701"]
    Quote Originally Posted by fingal
    No worries! It's weird though when you see posts with the exact same time.
    Not just two neither, but three posts telling the same in one minute?!?

  9. #8
    Just Joined!
    Join Date
    Apr 2005
    Location
    Venezuela
    Posts
    60
    thanks...it works...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •