M_R Posted December 10, 2010 Report Share Posted December 10, 2010 Hello, I have run into a problem here: I got this Win32:parite virus which infects executable files. It has infected my Linux installation via Wine (didn't know a virus could spread via Wine). All of the .exe files I have are infected. Now, I know that this virus will never be able to infect any Linux executable, but the problem is that this is a server here, and it's going to infect other machines running Windows via SAMBA. So I'd like to remove all the executables and replace them with new uninfected files. I found the file that briught the virus in, but it has spread all over, so I need to delete all .exe files first. Is there a search program which is as effective as Windows' tools? I don't care if it is a command, I just need a reliable way of locating any *.exe files. I have located most of them, but I need to make sure there are no more exe's in my Linux. Thanks in advance, I know this is quite simple. [moved from Software by spinynorman] Quote Link to comment Share on other sites More sharing options...
boatman9 Posted December 10, 2010 Report Share Posted December 10, 2010 (edited) You can try the locate command (rpm package name is 'mlocate' in case you don't have it installed). If there are lines where 'exe' is not at the end you can use grep to remove them from the list, but that could also remove a line you want to see if exe appears at the end and also elsewhere in the line. locate -i \.exe | grep -iv exe. | less Edited December 10, 2010 by boatman9 Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted December 10, 2010 Report Share Posted December 10, 2010 Another one: find ./ -iname *.exe will find all case insensitive of exe. Quote Link to comment Share on other sites More sharing options...
M_R Posted December 10, 2010 Author Report Share Posted December 10, 2010 I see. What is the difference between locate and find? Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted December 10, 2010 Report Share Posted December 10, 2010 locate uses a database, so it means you need to run updatedb first, before it can interrogate it. find you can use without building the database. updatedb would have to be run each time you start your system, or before you search. So either way, find or locate will take about the same time, unless the system is always on like a server, then you can schedule updatedb to update everything. slocate used to be used, it was a better version of locate, but then somehow disappeared, no idea why. Quote Link to comment Share on other sites More sharing options...
M_R Posted December 20, 2010 Author Report Share Posted December 20, 2010 (edited) Thank you guys for all your help. That's exaclty what I needed. Thanks Edited December 20, 2010 by M_R Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.