I have a USB containing important files. However it is infiltrated with some unwanted .exe files (probably virsuses) in each subfolder. Since I am on a Linux machine, the exe files won't affect me. However I want to remove them (for personal safety). So how do I do it using a Linux command or a shell/AWK or Python script.
migrated from stackoverflow.com Oct 28 '12 at 21:17This question came from our site for professional and enthusiast programmers. |
|||
|
|
|||
will show you all .exe files If you are satisfied with the results (please check before deleting!) you can issue the following command:
This will delete all matches found with the first command. |
|||||
|
|
If you have GNU find available use
|
|||
|
|
|
This will delete all the exe files present in your current and all its sub-directories:
|
|||
|
|
|
Run
check tmp.sh in your favorite editor; when you are happy:
to delete. |
|||
|
|