Let’s say you have a DNS server change, and need to update the zone records on all your domains to use the new name server “NS” records. Rather then going through each and every one of them in the WHM, you can run these 2 simple commands.
cd /var/named;grep -lR ns.oldnameserver.com *.db >> fixfiles.txt
for i in $(cat fixfiles.txt); do perl -i -p -e 's/ns.oldnameserver.com/ns.newnameserver.com/g' $i ;done
The first command will generate a file called fixfiles.txt that has a list of every zone file in /var/named that contains the old nameserver. The second command will then parse through that filefiles.txt file and will repalce every instance of the old name server with the new one.
You would need to run this twice. Once for the primary name and once for the secondary name server.
Once you have made the change, restart named so that the changes take affect.