My friend gave me a USB key that has Windows Viruses on it.
On my mac, when I try to delete them it fails and tells me that those files are "locked".
I ran an anti-virus, which also was unable to delete them for the same reason.
anti-virusutiwindows
My friend gave me a USB key that has Windows Viruses on it.
On my mac, when I try to delete them it fails and tells me that those files are "locked".
I ran an anti-virus, which also was unable to delete them for the same reason.
Best Answer
There are two options for files that came from a Windows drive:
command
+alt
+i
) to get the file information. There in the "General"-tab you can find and opt-out the "Locked"-option. Trash and delete them.cd /Volumes/YourDrive
, thenrm -r thefile.exe
. If that fails, trysudo rm -r thefile.exe
and enter your password.Mac has other steps if you can't unlock the file - see this article - TS1402 for details on immutable flags and if the directory permissions won't let you modify a file. The two above steps handle the vast majority of locked files on the mac.