Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2001
    Posts
    99

    need this command

    hi guys
    need these command in linux..


    to delete all the domain files in /var/named/domains

    to empty the contents of /etc/named.conf

    can someone help me with the commands please

    thanks
    dig

  2. #2
    Join Date
    Jul 2002
    Location
    Kuwait
    Posts
    10,573
    rm /var/named/db.* or rm /var/named/*.db
    vi /etc/named.conf , scroll down to the line that u want to delete everything after it and hit DG this will delete everything from that line.

    if u want empty it at all just do cat /dev/null > /etc/named.conf

    make sure you have a backup of them like doing something
    tar -cvf /tmp/namedbackup.tar /etc/named.conf /var/named/
    Bashar Al-Abdulhadi - KuwaitNET Internet Services Serving customers since 1997
    Kuwait's First Webhosting and Domain Registration provider - an ICANN Accredited Registrar

    Twitter: Bashar Al-Abdulhadi

  3. #3
    Join Date
    Feb 2004
    Posts
    772
    Hi,

    As suggested by Bashar, To delete all the domain files.

    rm -rf /var/named/*.db

    To delete all the files use the command
    rm -rf /var/named/*

    To empty the contents of named.conf file.
    1) vi /etc/named.conf
    2) :1 (moves to the first line)
    3) dG (deletes contents from current position to end of file.)

    Check out this. Hope these commands will be helpful for you.

    Regards,

    Bright

Posting Permissions

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