Secure Empty Trash on Mavericks

anadeco

macrumors newbie
Original poster
Jan 10, 2014
5
0
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
Password:
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.

Cheers,
AM
 

chrfr

macrumors G3
Jul 11, 2009
8,730
2,876
macintosh-2:~ ME$ sudo rm -rfv/Volumes/LACIE/.Trashes/501/virus
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.
 

DeltaMac

macrumors G3
Jul 30, 2003
9,889
2,517
Delaware
macintosh-2:~ ME$ sudo rm -rfv/Volumes/LACIE/.Trashes/501/virus
Password:
rm: illegal option -- /
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
...
What do I do next?
...
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
Code:
sudo rm -rfv /Volumes/LACIE/.Trashes/501/virus
And, that's assuming that the path to that file is correct.
 
Last edited:

anadeco

macrumors newbie
Original poster
Jan 10, 2014
5
0
@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.
 

chrfr

macrumors G3
Jul 11, 2009
8,730
2,876
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......
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!
 

anadeco

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

Thanks again!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.