×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles

    Unix/Usefull Commands: Difference between revisions

    Content added Content deleted
    imported>DrOwl
    (first draft.)
     
    imported>DrOwl
    (added in a example)
    Line 1: Line 1:

    just a quick dump of some usefull unix commands
    just a quick dump of some usefull unix commands


    Line 39: Line 38:
    Dig gets infomations from DNS
    Dig gets infomations from DNS


    dig @{servers NS} {server} [axfr|MX|NS|all]
    dig @{servers NS} {server} [axfr|MX|NS|any]


    axfr is a full zone tranfeer
    axfr is a full zone tranfeer


    all will retreave every thing it can
    any will retreave every thing it can


    == example of finding out about a domain name ==
    <pre>
    $ host -t NS microsoft.com
    microsoft.com name server ns3.msft.net.
    microsoft.com name server ns4.msft.net.
    microsoft.com name server ns5.msft.net.
    microsoft.com name server ns1.msft.net.
    microsoft.com name server ns2.msft.net.

    $ dig @ns3.msft.net microsoft.com any

    ; <<>> DiG 9.3.2 <<>> @ns3.msft.net microsoft.com any
    ; (1 server found)
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 259
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 12, AUTHORITY: 0, ADDITIONAL: 5

    ;; QUESTION SECTION:
    ;microsoft.com. IN ANY

    ;; ANSWER SECTION:
    microsoft.com. 3600 IN A 207.46.232.182
    microsoft.com. 3600 IN A 207.46.197.32
    microsoft.com. 172800 IN NS ns4.msft.net.
    microsoft.com. 172800 IN NS ns5.msft.net.
    microsoft.com. 172800 IN NS ns1.msft.net.
    microsoft.com. 172800 IN NS ns2.msft.net.
    microsoft.com. 172800 IN NS ns3.msft.net.
    microsoft.com. 3600 IN SOA dns.cp.msft.net. msnhst.microsoft.com. 2007010701 300 600 2419200 3600
    microsoft.com. 3600 IN MX 10 mailb.microsoft.com.
    microsoft.com. 3600 IN MX 10 mailc.microsoft.com.
    microsoft.com. 3600 IN MX 10 maila.microsoft.com.
    microsoft.com. 3600 IN TXT "v=spf1 mx include:_spf-a.microsoft.com include:_spf-b.microsoft.com include:_spf-c.microsoft.com include:_spf-ssg.microsoft.com ~all"

    ;; ADDITIONAL SECTION:
    ns4.msft.net. 3600 IN A 207.46.66.126
    ns5.msft.net. 3600 IN A 65.55.238.126
    ns1.msft.net. 3600 IN A 207.68.160.190
    ns2.msft.net. 3600 IN A 65.54.240.126
    ns3.msft.net. 3600 IN A 213.199.144.151

    ;; Query time: 12 msec
    ;; SERVER: 213.199.144.151#53(213.199.144.151)
    ;; WHEN: Mon Jan 8 04:25:11 2007
    ;; MSG SIZE rcvd: 502
    </pre>


    Ill try to add info about waht all this means.

    Revision as of 04:36, 8 January 2007

    just a quick dump of some usefull unix commands

    List the top ten largest files

    du -sk * | sort -rn | head -10

    nslookup

    nslookup will return infomation about domain names.

    nslookup

    nslookup -d {server}
    


    Host

    host will return infomation about domain names.

    host domain name


    -t querytype

                    Allows you to specify a particular querytype of information
                    to be looked up.  The arguments are defined in the man page
                    for named(8).  Currently-supported types include: ``a,
                    ``ns, ``md, ``mf, ``cname, ``soa, ``mb, ``mg,
                    ``mr, ``null, ``wks, ``ptr, ``hinfo, ``minfo,
                    ``mx, ``uinfo, ``uid, ``gid, ``unspec. Additional-
                    ly, the wildcard, which may be written as either ``any or
                    ``*, can be used to specify any (all) of the above types.
                    Types must be given in lower case.  Note that the default is
                    to look first for ``a, and then ``mx, except that if the
                    verbose option is turned on, the default is only ``a. The
                    ``-t option is particularly useful for filtering informa-
                    tion returned by host; see the explanation of the ``-l op-
                    tion, below, for more information.
    

    dig

    Dig gets infomations from DNS

    dig @{servers NS} {server} [axfr|MX|NS|any]

    axfr is a full zone tranfeer

    any will retreave every thing it can


    example of finding out about a domain name

    $ host -t NS microsoft.com
    microsoft.com name server ns3.msft.net.
    microsoft.com name server ns4.msft.net.
    microsoft.com name server ns5.msft.net.
    microsoft.com name server ns1.msft.net.
    microsoft.com name server ns2.msft.net.
    
    $ dig @ns3.msft.net microsoft.com any
    
    ; <<>> DiG 9.3.2 <<>> @ns3.msft.net microsoft.com any
    ; (1 server found)
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 259
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 12, AUTHORITY: 0, ADDITIONAL: 5
    
    ;; QUESTION SECTION:
    ;microsoft.com.                 IN      ANY
    
    ;; ANSWER SECTION:
    microsoft.com.          3600    IN      A       207.46.232.182
    microsoft.com.          3600    IN      A       207.46.197.32
    microsoft.com.          172800  IN      NS      ns4.msft.net.
    microsoft.com.          172800  IN      NS      ns5.msft.net.
    microsoft.com.          172800  IN      NS      ns1.msft.net.
    microsoft.com.          172800  IN      NS      ns2.msft.net.
    microsoft.com.          172800  IN      NS      ns3.msft.net.
    microsoft.com.          3600    IN      SOA     dns.cp.msft.net. msnhst.microsoft.com. 2007010701 300 600 2419200 3600
    microsoft.com.          3600    IN      MX      10 mailb.microsoft.com.
    microsoft.com.          3600    IN      MX      10 mailc.microsoft.com.
    microsoft.com.          3600    IN      MX      10 maila.microsoft.com.
    microsoft.com.          3600    IN      TXT     "v=spf1 mx include:_spf-a.microsoft.com include:_spf-b.microsoft.com include:_spf-c.microsoft.com include:_spf-ssg.microsoft.com ~all"
    
    ;; ADDITIONAL SECTION:
    ns4.msft.net.           3600    IN      A       207.46.66.126
    ns5.msft.net.           3600    IN      A       65.55.238.126
    ns1.msft.net.           3600    IN      A       207.68.160.190
    ns2.msft.net.           3600    IN      A       65.54.240.126
    ns3.msft.net.           3600    IN      A       213.199.144.151
    
    ;; Query time: 12 msec
    ;; SERVER: 213.199.144.151#53(213.199.144.151)
    ;; WHEN: Mon Jan  8 04:25:11 2007
    ;; MSG SIZE  rcvd: 502
    


    Ill try to add info about waht all this means.

    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.