View Single Post
  #4 (permalink)  
Old 07-01-2009, 01:16 AM
Spiral's Avatar
Spiral Spiral is offline
Registered User
 
Join Date: Jun 2005
Location: Area 51
Posts: 1,501
Spiral is on a distinguished road
Thumbs up

Just a little bit cleaner run of the same command written for fewer unintended
side effects than what PlatinumServerM had in good faith posted above ....

Code:
# replace '(old string)' '(new string)' -- /var/named/*.db
You can run this putting whatever you want for (old string) and (new string)
respectively and all instances of those strings will be updated in your DNS
zone files on your server.

Don't forget to update the serial number on your zone files and restart
your "named" service to make the changes effective:
Code:
# sed -i 's/200[0-9]\{7\}/2009063010/g' /var/named/*.db
# service named restart
# service named status
(Incidentally the serial number in the example above is one you might use for updating all the
zone files to a valid serial number for the date this post was made and runs in the
format of "yyyymmddee" where y= year, m = month, d = day, and e = edit number for day)


.

Last edited by Spiral; 07-01-2009 at 01:33 AM.
Reply With Quote