RE: Mass find/replace...

2008-12-05 Thread Marc Coyles
+ not \; or you will fork on every result. Additionally, is this injected code one long string or broken down by the mailer? Grep isn't the best way to deal with it. It's pretty easy to correct with perl, bit trickier if it's multiline, still not too hard: find /home/horbury -type f

RE: Mass find/replace...

2008-12-05 Thread Marc Coyles
+ not \; or you will fork on every result. Additionally, is this injected code one long string or broken down by the mailer? Grep isn't the best way to deal with it. It's pretty easy to correct with perl, bit trickier if it's multiline, still not too hard: find /home/horbury -type f

Re: Mass find/replace...

2008-12-05 Thread Peter Boosten
Marc Coyles wrote: I'm presuming it'd be: Find /home/horbury -type f -name *.bak -exec \ Rm *.bak find /home/horbury -name *.bak -exec rm {} \; Peter -- http://www.boosten.org ___ freebsd-questions@freebsd.org mailing list

Re: Mass find/replace...

2008-12-05 Thread Mel
On Friday 05 December 2008 10:17:46 Marc Coyles wrote: + not \; or you will fork on every result. Additionally, is this injected code one long string or broken down by the mailer? Grep isn't the best way to deal with it. It's pretty easy to correct with perl, bit trickier if it's

Re: Mass find/replace...

2008-12-05 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Peter Boosten wrote: | Marc Coyles wrote: | I'm presuming it'd be: | | Find /home/horbury -type f -name *.bak -exec \ | Rm *.bak | | | find /home/horbury -name *.bak -exec rm {} \; | find /home/horbury -type f -name '*.bak' -delete 'delete'

RE: Mass find/replace...

2008-12-05 Thread Marc Coyles
All done n' dusted now - thanks very much for everyone's input...! Have noted everything down in the back of my copy of Absolute FreeBSD 2nd Edition (which has inherited quite a few additional pages since I bought it). Now that that's done, I can start to wander thru logs and find who/how...

RE: Mass find/replace...

2008-12-05 Thread Marc Coyles
All done n' dusted now - thanks very much for everyone's input...! Have noted everything down in the back of my copy of Absolute FreeBSD 2nd Edition (which has inherited quite a few additional pages since I bought it). Now that that's done, I can start to wander thru logs and find

Re: Mass find/replace...

2008-12-05 Thread Mel
On Friday 05 December 2008 11:19:09 Marc Coyles wrote: All done n' dusted now - thanks very much for everyone's input...! Have noted everything down in the back of my copy of Absolute FreeBSD 2nd Edition (which has inherited quite a few additional pages since I bought it). Now that

RE: Mass find/replace...

2008-12-05 Thread Wojciech Puchar
Arse - I spoke too soon. Anyone know any perl to remove blank lines???! i don't know perl but grep -v ^$ will remove all empty lines ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To

Re: Mass find/replace...

2008-12-04 Thread Vincent Hoffman
Marc Coyles wrote: Never had to do this so not sure where to start. Have googled and found some solutions but they don't particularly work (see below)... Someone has managed to inject php code into a PILE of php pages on my webserver... ?

Re: Mass find/replace...

2008-12-04 Thread Julien Cigar
the following should work : $ find /home/horbury -type f -print0 | xargs -0 grep 'base64_decode' or : $ find /home/horbury -type f -exec grep 'base64_decode' {} \; On Thu, 2008-12-04 at 12:14 +, Marc Coyles wrote: Never had to do this so not sure where to start. Have googled and found

Re: Mass find/replace...

2008-12-04 Thread Ruben de Groot
On Thu, Dec 04, 2008 at 12:52:02PM +, Vincent Hoffman typed: Marc Coyles wrote: I need to do a find / replace throughout the entire of the /home/horbury/public_html directory... I've tried 'find /home/Horbury/ -type f | xargs grep -l base64_decode' to get a list of the files that

Re: Mass find/replace...

2008-12-04 Thread Wojciech Puchar
Or just: grep -r base64_decode /home/Horbury rm -rf /home/Horbury and then - write the webpage code properly :) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail

Re: Mass find/replace...

2008-12-04 Thread Mel
On Thursday 04 December 2008 13:58:20 Julien Cigar wrote: the following should work : $ find /home/horbury -type f -print0 | xargs -0 grep 'base64_decode' or : $ find /home/horbury -type f -exec grep 'base64_decode' {} \; + not \; or you will fork on every result. Additionally, is this