Setting Default TTL

Barry Margolin barmar at genuity.net
Mon Jan 22 15:46:11 UTC 2001


In article <94eb5u$siv at pub3.rc.vix.com>,
Philip Thomas <pthomas at mbay.net> wrote:
>Greetings,
>
>I have about few 1000 domains I want to migrate over to 9.1.0, the only
>problem I am having is that I need to set the TTL in every file. So, my
>question is there a way to tell BIND to ignore the fact that no TTL exists
>and just use a default. Or does someone have a dirty little script that can
>go through all my domain files and add the default TTL accordingly ?

perl -i -p -e 'BEGIN {print "\$TTL 86400\n"}' db.*

or:

for file in db.*
do
  awk 'BEGIN {print "$TTL 86400"} {print}' $file > $file.new
  mv $file.new $file
done

-- 
Barry Margolin, barmar at genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.



More information about the bind-users mailing list