How to mass Search & Replace in text files.

Tyler Aviss tjaviss-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Fri May 1 15:08:46 UTC 2009


The "rpl" command can do mass-replacements of files in a directory or
subdirectories. I've used it to update thousands of files in one go
without any issues.

- TJA

On Fri, May 1, 2009 at 7:26 AM, Lance F. Squire <lance-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org> wrote:
> One of the sites on my server has been infected with some malicious Java
> Script.
>
> I can locate all the files with:
>
> grep "Bad JS" `find . -name "*.html"`
>
> Is there a way to modify this to replace the "Bad JS" with ""?
>
> Or a find variant?
>
>
> Thanks in advance,
>
> Lance F. Squire
> --
> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>



-- 
Tyler Aviss
Systems Support
LPIC/LPIC-2
(647) 302-0942
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list