![]() |
Search and Replace on a Linux Server
Hey guys,
I have hundreds of links I need to replace across a few different domains/cpanels. I was wondering if any one knew of an easy way to do this? Or some script to do it? (Like bk search and replace BUT on the server itself) Thanks!!! |
Use sed or awk -- Google them for examples. |
something like this?
find / -name "*.php" -print | xargs sed -i 's/www.example.com/www.newurl.com/g' what do the urls look like that you're trying to change? |
If you're on Linux, use rpl
Usage: rpl [options] old_string new_string target_file(s) "man rpl" will give you more options, such as how to do recursive... Works great for things like this -- Bill |
All times are GMT -7. The time now is 02:13 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123