![]() |
tech question
how to search all html files on server for one code line and then mass edit to remove that line ?
..........:1orglaugh :( ehh... thx |
|
yes. thank you. that was very nice of you. you are so funny
|
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 |
Make sure your file are backed up anyway before trying this obviously in case you fuck something up ;
|
Quote:
Thx ! I will try it... i need to get rid off iframe malware...... |
Quote:
|
Quote:
|
All times are GMT -7. The time now is 11:54 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123