How to delete: hdc1._.tar.bz2?

Discussion in 'Linux' started by vickoxy, Sep 19, 2008.

  1. vickoxy

    vickoxy

    Joined:
    Aug 28, 2008
    Messages:
    63
    Likes Received:
    0
    Ok, i copied hdc1._.tar.bz2 to my AAO while i needed one file-i installed it an now i want to delete hdc1._.tar.bz2. But there are more than 1300 small files that are impossible to remove. I tried as sudo with rm, rmdir, mv, but nothing-i thing that i need each file separately to remove. I it possible just in one move to delete that directory?
     
    vickoxy, Sep 19, 2008
    #1
  2. vickoxy

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    cd to the directory containing files you want to remove and then ...

    rm -r *

    That should remove them all and any directories within.

    Be careful that you're in the directory that you want to remove files/directories from as the -r means a recursive remove.

    see ...

    http://unixhelp.ed.ac.uk/CGI/man-cgi?rm


    Cheers.
     
    rbil, Sep 19, 2008
    #2
  3. vickoxy

    vickoxy

    Joined:
    Aug 28, 2008
    Messages:
    63
    Likes Received:
    0
    Unfortunally it does not work. This is message that i became. I made my self directoriy papierkorb (trash).

    [root@localhost papierkorb]# rm -r hdc1._
    rm: descend into directory `hdc1._'?
    [root@localhost papierkorb]# rm -r hdc1._
    rm: descend into directory `hdc1._'?
     
    vickoxy, Sep 19, 2008
    #3
  4. vickoxy

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    From the manual linked above:

    -f, --force
    ignore nonexistent files, never prompt

    so,

    rm -rf hdc1._

    might do it.
     
    Japser, Sep 19, 2008
    #4
  5. vickoxy

    vickoxy

    Joined:
    Aug 28, 2008
    Messages:
    63
    Likes Received:
    0
    Jasper, thanks-that did it.
    :D
     
    vickoxy, Sep 19, 2008
    #5
  6. vickoxy

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    Did you type "y" (without quotes) when asked the question?

    Cheers.
     
    rbil, Sep 20, 2008
    #6
  7. vickoxy

    vickoxy

    Joined:
    Aug 28, 2008
    Messages:
    63
    Likes Received:
    0
    Yes-but it asked me that for every file. That means that i should type yes for more than 1000times. But rm
    did the job. Thanks
     
    vickoxy, Sep 20, 2008
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.