Secure Empty Trash on Mavericks

Discussion in 'OS X Mavericks (10.9)' started by anadeco, Jan 10, 2014.

  1. anadeco macrumors newbie

    Jan 10, 2014
    Hello - I really need your help. I have been trying to get rid of this file located on an exterior hard drive...... and I have tried everything and have read a lot of posts before writing mine
    Empty trash, Secure Empty Trash, and Terminal commands. I have restarted the computer, renamed the file, the file is not locked I have read write privileges, I am the administrator on the computer ...... and the only progress I seem to have made is just below for your reference.

    macintosh-2:~ ME$ sudo rm -rfv/Volumes/LACIE/.Trashes/501/virus
    rm: illegal option -- /
    usage: rm [-f | -i] [-dPRrvW] file ...
    unlink file

    How do I unlink the file?
    I fear it is a corrupted file (I even named it Virus):eek:
    What do I do next?

    Before you ask - I do not have a PC that I can use to empty the trash (diehard Mac user and I work at home) so I really can't afford a virus on my brand new beautiful iMac :)

    Please help. FYI: I am well versed but not an expert.

  2. chrfr macrumors 604

    Jul 11, 2009
    You need a space between the -rfv and the /.
    NOTE: Be extremely careful using these commands as you can delete things you don't mean to if you don't get the syntax right.
    Also note that there are no Mac viruses in the wild, and that in this case, you don't actually need a secure erase to do what you're trying to do.
  3. DeltaMac, Jan 10, 2014
    Last edited: Jan 10, 2014

    DeltaMac macrumors G3


    Jul 30, 2003
    The results tells you that the "/" is improperly used.
    So, I see that you are missing a space between the -rfv and the /Volumes…
    so should be
    sudo rm -rfv /Volumes/LACIE/.Trashes/501/virus
    And, that's assuming that the path to that file is correct.
  4. anadeco thread starter macrumors newbie

    Jan 10, 2014
    @DeltaMac : I tried simply emptying the trash and this particular file sticks - it has been sticking for about 6 months now..... not sure what it is. The file itself is empty but before I renamed it, it was showing as Chinese characters.

    I got the path to the file by dragging it into the Terminal window and the terminal gave me the name and path - this is the correct procedure?

    @chrfr : if indeed I have the correct path (I got it by dragging the file into the Terminal Window and Terminal gave me the rest) - shall I try your command? I am worried when you say it will erase everything! I have a lot of work files on this disk so I would rather not take the chance.... or I can back them up and erase everything......

    Please advise.
  5. chrfr macrumors 604

    Jul 11, 2009
    Well, you must have a backup of everything, regardless! Just understand that a misplaced space can turn your "rm" command into deleting everything on your disks. If you put the space in after your "rm -rfv" command and then drag the suspect file to the terminal window, you will probably be safe.
    Again, back up your files!
  6. anadeco thread starter macrumors newbie

    Jan 10, 2014
    Thank you all - I backed up just in case but indeed the command removed the crazy Chinese file I had. It worked!

    Thanks again!

Share This Page