How to replace string in files

From vpsget wiki
Jump to: navigation, search

Here is the example of how to replace string for another string in batch of files. Here is the example how to change ip address to another in all apache virtual hosts conf files:

sed -i -- 's/111.11.51.11/ 23.18.99.9/g' /etc/apache2/sites-available/*