100 Useful Command-Line Utilities

by Oliver; 2014

93. dig

dig is the "DNS lookup utility." If we use the same test IP address as we did in the example above:
$ dig 74.125.224.18

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.32.amzn1 <<>> 74.125.224.18
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 59017
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;74.125.224.18.                 IN      A

;; AUTHORITY SECTION:
.                       10467   IN      SOA     \
a.root-servers.net. nstld.verisign-grs.com. 2014052201 1800 900 604800 86400

;; Query time: 1 msec
;; SERVER: 172.16.0.23#53(172.16.0.23)
;; WHEN: Thu May 22 23:10:06 2014
;; MSG SIZE  rcvd: 106
This is the IP's DNS record.

<PREV   NEXT>