[ubuntu-uk] Automating find and replace

Gareth France gareth.france at gmail.com
Tue Sep 16 20:08:48 UTC 2014


Not ubuntu related but I'm hoping someone may have the answer I need. 
Today I discovered my webspace has been hacked and several sites now 
contain additional code at the start of every single PHP file. Looking 
at my backups I can see it  has been there for a while so restoring from 
a very old backup could cause me issues.

Is there some way I could do a recursive find and delete on that code? 
It is a very long single line including slashes, hashes, exclaimation 
marks etc so using sed would be difficult as the examples I have seen 
show /thing to change/thing to change to/.

Any ideas very welcome.



More information about the ubuntu-uk mailing list