Mass change in file

If you have switched to a new service provider and all DNS records need to be adjusted to the new IP's, I have a command for you that fixes it in a few seconds time.

Old IP: 192.168.1.10
New IP: 10.0.0.25

# perl -pi -e 's/192.168.1.10/10.0.0.25/' /var/named/*.db

Off course this command can also be used on any other file you need to mass change data.

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

Linux rebuild broken software raid array - CENTOS

With this article I will show you how to look if a raid array (in our case a RAID1 array) is...

Block IP from your server

You can block an IP (12.12.12.12) from your server with the following command:# iptables -I INPUT...

Check port used in linux

If you want to see which process is using which port, you can do it with the following command:#...

Empty mail queue in exim

So you have a lot of mails in the mail queue, from f.e spam accounts?First check how many mails...

SATA drive not recognized in linux

If your SATA drive does not get recognized when installing linux (happens on older linux...

Powered by WHMCompleteSolution