Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-01-2009, 05:07 PM   #1
klinton
So Fucking Banned
 
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
tech question

how to search all html files on server for one code line and then mass edit to remove that line ?
.......... ehh... thx
klinton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-01-2009, 05:23 PM   #2
HorseShit
Too lazy to set a custom title
 
Join Date: Dec 2004
Posts: 17,513
HorseShit is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-01-2009, 05:29 PM   #3
klinton
So Fucking Banned
 
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
yes. thank you. that was very nice of you. you are so funny
klinton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-01-2009, 05:30 PM   #4
Swish
Confirmed User
 
Swish's Avatar
 
Join Date: Mar 2006
Location: San Diego, CA
Posts: 1,421
find / -type f -name *.html -exec grep -l "search_text" {} \; | perl -pi -e 's/search_text//g'

You'll have to regex escape the search_text but that's how I would do it.

If you want to make a backup of the files before changing them make it 'perl -pi.bak -e' for that part instead which will copy the chaged file and add '.bak' to the name
__________________


Naughty America - Director of Technology
It's a CELEBRATION bitches!! For the hottest content promote Naughty America!
swish at naughtyamerica dot com | ICQ: 226 737 620 | See Who I Am At AdultWhosWho.com!
Swish is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-01-2009, 05:31 PM   #5
Swish
Confirmed User
 
Swish's Avatar
 
Join Date: Mar 2006
Location: San Diego, CA
Posts: 1,421
Make sure your file are backed up anyway before trying this obviously in case you fuck something up ;
__________________


Naughty America - Director of Technology
It's a CELEBRATION bitches!! For the hottest content promote Naughty America!
swish at naughtyamerica dot com | ICQ: 226 737 620 | See Who I Am At AdultWhosWho.com!
Swish is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-01-2009, 05:31 PM   #6
klinton
So Fucking Banned
 
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
Quote:
Originally Posted by Swish View Post
find / -type f -name *.html -exec grep -l "search_text" {} \; | perl -pi -e 's/search_text//g'

You'll have to regex escape the search_text but that's how I would do it.

If you want to make a backup of the files before changing them make it 'perl -pi.bak -e' for that part instead which will copy the chaged file and add '.bak' to the name

Thx ! I will try it...
i need to get rid off iframe malware......
klinton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-01-2009, 05:45 PM   #7
Cyber Fucker
Hmm
 
Cyber Fucker's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: On an endless road around the world for rock and roll.
Posts: 12,642
Quote:
Originally Posted by Justin View Post
Hey, this was a tech question, I don't really want to watch this dirty ass pic in all threads... It's already enough of this kind of stuff in sigs and avatars
__________________
Cyber Fucker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-01-2009, 06:07 PM   #8
who
So Fucking Banned
 
Join Date: Aug 2003
Location: ICQ #23642053
Posts: 19,593
Quote:
Originally Posted by Swish View Post
find / -type f -name *.html -exec grep -l "search_text" {} \; | perl -pi -e 's/search_text//g'

You'll have to regex escape the search_text but that's how I would do it.

If you want to make a backup of the files before changing them make it 'perl -pi.bak -e' for that part instead which will copy the chaged file and add '.bak' to the name
Sir, you assume too much.
who is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.