View Single Post
Old 2004-06-13, 09:53 AM   #13
swedguy
Vagabond
 
swedguy's Avatar
 
Join Date: Aug 2003
Posts: 2,374
Send a message via ICQ to swedguy
http://www.sponsororganizer.com/FreeScripts/cleo.html

Save the script as cleo.pl

Chmod it to 755

Run:
find /main/domain/dir \( -name '*.html' -o -name '*.php' -o -name '*.htm' \) -exec cleo.pl {} \;

It will run through all your .html, .php and .htm files and delete the code.
Remember that it will open and save all files, even the ones that doesn't have the code in it (it will just not change anything). So if you have any files that are owned by the webserver user, it _might_ change the owner to the user you run the script as.

I made a test run here on a bunch of files with and without the code in, and it worked like a charm. A hot advice is to make a test run in a temp folder

My ICQ is 252081 if you need any help.
Good luck if you decide to use it

swed
swedguy is offline   Reply With Quote