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]#

No related posts.

Have a computer problem? Ask in our SUPPORT forum!

Receive Discounted Software

No bull. Want cheap discounts for common software products?
  • AntiVirus
  • Video editing tools
  • Web development tools
  • Registry Cleaners
  • Computer speed boosters!
Our editors get these products sent to us WEEKLY for review.

WE WANT TO PASS THESE DISCOUNTS ON TO YOU! (We honestly don't need them)

So whack your email in the box below and when we receive stuff we'll forward it to you! Its that simple.


Leave a Reply