I have a flash drive from a client and on the drive was a virus 'rejoice.exe' I stupidly moved it to my trash and now can't delete it because it's locked. I tried holding the option while selecting trash but it stubbornly won't delete. What's my next move?
The free utility Onyx includes a feature that allows you to force empty the trash. May work although obviously it was designed for volumes with a Mac format.
__________________
I retain all rights to images I have posted on ehMac. They were posted that other members of the community could enjoy them. They may not be used or sold in any other way without my written consent.
I have a flash drive from a client and on the drive was a virus 'rejoice.exe' I stupidly moved it to my trash and now can't delete it because it's locked. I tried holding the option while selecting trash but it stubbornly won't delete. What's my next move?
What I ended up doing--I simply dragged the bad file back onto the flashdrive which removed it from my 'Trash', ejected the flash drive and gave it back to the client telling them they needed to reformat the drive and to check their computers for this virus.
I didn't open it so I hope there isn't any harm done to my system.
Location: Aylmer (Gatineau) across the river from Ottawa
Posts: 16,081
Quote:
Originally Posted by redhalton
Thanks...
What I ended up doing--I simply dragged the bad file back onto the flashdrive which removed it from my 'Trash', ejected the flash drive and gave it back to the client telling them they needed to reformat the drive and to check their computers for this virus.
I didn't open it so I hope there isn't any harm done to my system.
Keeping my fingers crossed in Oakville ;-))
No there won't be any damage done to your system unless you had a vitualized version of Windows (ala Parallels or Fusion etc.) open at the time and even then I am not sure if your virtualized Windows installation could be at risk on that front.
If it were the case perhaps someone with more expertise than myself in this area could chime in.
That file may not even been a virus. When you trash an item on removable media and do not empty the trash while the media is connected to your system, you get the issue you mentioned originally. All you really had to do is re-connect the flash drive and empty the trash.
OS X keeps several trash sub folders. If you explore invisible files and folders using the terminal, you'll see the invisible "dot" folders named .Trash and .Trashes. .Trashes will perhaps contain additional sub folders. This is the folder that would contain external "trashes" usually organized by UID (user id) based on who trashed what. Your UID will usually be 502 if you're the original admin. If you explore 502, you'll likely see the file and can remove it instantly using the rm command.
I'm pretty sure items on external media that are trashed are moved into a .Trash folder on that external media. In other words, they are not transfered to the boot volume/user profile .Trash directory. You can test this by emptying your Trash, connecting a USB drive and deleting a file. You'll see the Trash icon in your dock visibly fill. Eject the volume and you'll see it now appear as empty.
I'm pretty sure items on external media that are trashed are moved into a .Trash folder on that external media. In other words, they are not transfered to the boot volume/user profile .Trash directory. You can test this by emptying your Trash, connecting a USB drive and deleting a file. You'll see the Trash icon in your dock visibly fill. Eject the volume and you'll see it now appear as empty.
I didn't explain it well in the second paragraph. The Desktop/Finder Trash is a graphical representation of what could be several invisible "trash" folders located on different volumes. External trash folders are called ".Trashes" while the boot volume folder is called simply ".Trash". Inside these will be folders containing the uid of the user who removed the item. Looking through mine it shows 0 and 501 with 501 being me, the original admin account.
I think we all understand that when we trash something the OS just flags the file and frees up the space on the volume for an overwrite. The bulging waste basket is just a fancy representation, the file remains put.
I'll guess that transferring the exe file from the flash drive and consequent attempt to trash it, was more a permissions issue rather than an issue with locked items or it being a virus.
I've had similar issues myself with transferred files from external volumes having all kinds of different permissions set. In most cases this can be corrected through the Get Info dialog box.