Results 1 to 4 of 4

Thread: DNS file edit

  1. #1
    Join Date
    Mar 2007
    Location
    Agios Dimitrios,Attiki,GR
    Posts
    113

    DNS file edit

    For DNS changes I use only CPANEL to edit.
    Now I need to make massive changes to some parameters ( like contact email, remove some lines unset e.t.c)
    How can I edit the file with dns records and make the change easy and massive?

  2. #2
    Join Date
    Aug 2005
    Location
    Egypt
    Posts
    110
    for exampel :
    replace ns2.olddomain.com. ns3.newdomain.com. -- /var/named/*.db

    Regards
    GNU/Linux system Engineer
    Contact Me: 00201003338749

  3. #3
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    You should make a backup of the zone directory first.

    Use sed to confirm the changes for an example file.

    sed 's/existing_pattern/new_pattern/g' /path/to/filename
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  4. #4
    Join Date
    Apr 2005
    Location
    Cochin
    Posts
    2,446
    The sed command depends on what exact you are trying to replace. The following URL has some one liners that would help you with sed

    http://www.student.northpark.edu/pem...d/sed1line.txt

    However taking the backup as david510 is a must
    Sam
    Supportlobby.com - Expertise in Windows/Linux server support, IaaS and PaaS Management
    Spiralbean.com - Custom Software Development
    Email: exec @ activelobby.net | Skype: unni_active

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •