Modify multiple zone files

I came across a scenario where I needed to change an IP address that was used in over 200 zone files.

Jonesy came the rescue using the power of sed !
sed -i s/oldip/newip/g *

Example.

james@spork [/var/named]#
james@spork [/var/named]# sed -i s/192.168.0.1/192.168.0.2/g *
james@spork [/var/named]#
Did you like this? Share it:

No related posts.



Leave a Reply

You must be logged in to post a comment.