Results 1 to 6 of 6

Thread: Help, How do I remove an entire directory?

  1. #1
    Join Date
    May 2008
    Location
    Ontario, Canada
    Beans
    Hidden!
    Distro
    Ubuntu

    Exclamation Help, How do I remove an entire directory?

    I have to remove an a directory and all its files. How do I do this?

    rmdir -f help (didn't work)

    ps: help is filled with files.

    I need an answer in the next hour.

    thanks in advance

  2. #2
    Join Date
    May 2007
    Beans
    7,032
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Help, How do I remove an entire directory?

    Try:
    Code:
    rm -ri /path/to/dir
    The i stands for "interactive," and prompts you about each file. Safer is to use a file manager to move the directory to trash.
    I am aware of all internet traditions. | Getting the best help | Text formatting codes | My last.fm profile
    Should I PM support questions? NO!

  3. #3
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Help, How do I remove an entire directory?

    What do you mean "help is filled with files"? Hopefully you're not deleting anything outside your /home.

  4. #4
    Join Date
    May 2007
    Beans
    7,032
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Help, How do I remove an entire directory?

    Quote Originally Posted by oldos2er View Post
    What do you mean "help is filled with files"? Hopefully you're not deleting anything outside your /home.
    "help" is the name of the directory. rmdir won't by default execute a request to remove a directory that has contents.
    I am aware of all internet traditions. | Getting the best help | Text formatting codes | My last.fm profile
    Should I PM support questions? NO!

  5. #5
    Join Date
    Apr 2005
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Help, How do I remove an entire directory?

    perhaps look up the "rm" command.
    Code:
    man rm
    specifically take a look at the Options for --recursive

    its a good idea to use the full path to the folder to make sure you don't delete something you didn't mean to.

  6. #6
    Join Date
    May 2008
    Location
    Ontario, Canada
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Help, How do I remove an entire directory?

    Thanks for the replies. I went around the problem by graphically logging in to the remote computer. Whoever said that help was a directory was correct.

    Before I had graphical capabilities,it was necessary for me to know how to do it using the command line. But now I can right click and delete things.

    Thanks for the quick responses, I got them on time. Just didn't bother to reply until now.

    Cheers - CC7

Tags for this Thread

Bookmarks

Posting Permissions

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