![]() |
Recursive Search And Replace Hey Warriors, Looks like my server has been hacked again. Ugh. Anyway, I need to get my hands on a recursive search and replace script in PHP or PERL. I could write one myself, but frankly, I'm sure there's a million of them out there. If you know of one with good documentation, please list it. I need to get this taken care of ASAP. Thanks. |
Re: Recursive Search And Replace Ultraedit has this. Can use regular expressions for the search and replaces. Not sure if it goes through multiple files though. Dreamweaver (you could always download the trial) definitely does go through all files in a folder, though. |
Re: Recursive Search And Replace I'm hoping to avoid reg exp, first of all because I want to shoot myself when I use them, and secondly it's one string that I need to remove from every file on my server. Quote:
|
Re: Recursive Search And Replace You can use both UltraEdit's and Dreamweaver's search and replace normally (by string) too; I was just pointing out that they have powerful features (whereby you can use regexes) if needed. But yeah, they're both suitable for a simple search and replace :) |
Re: Recursive Search And Replace Quote:
P.S. Good on you for the Firefly avatar ;) |
Re: Recursive Search And Replace UltraEdit would work great for this task. Another fine choice is PS Pad, unlike UltraEdit it's a free text editor (to be fair you can download a free trial of UltraEdit): editor PSPad - freeware HTML editor, PHP editor, XHTML, JavaScript, ASP, Perl, C, HEX editor Bill |
Re: Recursive Search And Replace These sound good, but all the files are server-side, and I'd like to keep them there. So, if I can find something I can run via SSH, that would be best. That's why I'd like one in PHP or PERL. BASH may even work well. |
Re: Recursive Search And Replace This is what I do: Code: find ./ -type f | xargs sed -i 's/What you want to find/Whatever you want to replace it with/g' |
Re: Recursive Search And Replace I think I know what your problem is .... your PC is infected with a virus... Scan your entire PC with a good antivirus (QuickHeal,Avira) ...... also, some types of viruses delete the bottom part of the page.... so simple replacing may not work .... I use lacehost.com for hosting (do not go by their site design) and they really are very helpful in these matters ..... |
Re: Recursive Search And Replace Quote:
Recursive search and replace (with a combination of bash, find and perl) (it's a tutorial with step by step info and code) HTH Carlos |
Re: Recursive Search And Replace Quote:
|
Re: Recursive Search And Replace Quote:
I'll give this a shot real quick and see what happens. |
Re: Recursive Search And Replace Quote:
Quote:
|
| All times are GMT -6. The time now is 01:03 AM. |