Results 1 to 6 of 6

Thread: Doh! Easier than 'rm' and 'rmdir'?

  1. #1
    Associate
    Join Date
    Apr 2002
    Posts
    39

    Doh! Easier than 'rm' and 'rmdir'?

    I can't seem to find the syntax to allow me to delete a non-empty directory, so I've been dropping into each directory, 'rm'ing all files in the directories and sub's, then 'rmdir'ing the empty dir's.

    Must be an easier way!? The '--ignore-fail-on-non-empty' option obviously just disables the error output if the directory isn't empty.

  2. #2
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Re: Doh! Easier than 'rm' and 'rmdir'?

    I can't seem to find the syntax to allow me to delete a non-empty directory, so I've been dropping into each directory, 'rm'ing all files in the directories and sub's, then 'rmdir'ing the empty dir's.

    Must be an easier way!? The '--ignore-fail-on-non-empty' option obviously just disables the error output if the directory isn't empty.
    rm -R /path/to/your/directory

  3. #3
    Guest

    Re: Doh! Easier than 'rm' and 'rmdir'?

    rm -rf /home/dumbuser/this_dir_must_die ??

  4. #4

    Re: Doh! Easier than 'rm' and 'rmdir'?

    be also sure to look at http://www.linuxjunior.org/cgi-bin/p...play&id=50
    maybe this will help you ..

  5. #5
    Associate
    Join Date
    Apr 2002
    Posts
    39

    Re: Doh! Easier than 'rm' and 'rmdir'?

    Thank you, all.

    The 'rmdir --help' wasn't too helpful ... shoulda looked a bit closer at the 'rm --help' ... both options defined above were there.

    Chuckles on the '/home/dumbuser/' shot, there Love. I symlinked it to '/home/NEWuser/ ;D

    ... thanks for the URL ... I couldn't find this stuff in my O'Reilly 'Running Linux' text ... unless I went cover to cover again.

  6. #6
    Mentor cga's Avatar
    Join Date
    May 2001
    Posts
    1,433

    Re: Doh! Easier than 'rm' and 'rmdir'?

    Try Midnight Commander- it make life so much easier.

Similar Threads

  1. Life with SSH made easier. . .
    By di||itante in forum Linux - General Topics
    Replies: 0
    Last Post: 06-01-2005, 07:00 PM
  2. Windows vs. Linux- Which is easier to install?
    By shebang in forum General Chat
    Replies: 16
    Last Post: 04-27-2004, 02:12 AM

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
  •