dig command get a long answer on Linux/Unix

Fig.02: Getting a long ans useful answer about a domain name

Fig.02: Getting a long ans useful answer about a domain name

The syntax is as follows to print detailed information about a domain name called yahoo.com:
$dig +multiline +noall +answer +nocmd yahoo.com ANY
Sample outputs:

yahoo.com.		1595 IN	A 98.139.183.24
yahoo.com.		1595 IN	A 98.138.253.109
yahoo.com.		1595 IN	A 206.190.36.45
yahoo.com.		1595 IN	MX 1 mta5.am0.yahoodns.net.
yahoo.com.		1595 IN	MX 1 mta7.am0.yahoodns.net.
yahoo.com.		1595 IN	MX 1 mta6.am0.yahoodns.net.
yahoo.com.		21395 IN NS ns4.yahoo.com.
yahoo.com.		21395 IN NS ns8.yahoo.com.
yahoo.com.		21395 IN NS ns5.yahoo.com.
yahoo.com.		21395 IN NS ns2.yahoo.com.
yahoo.com.		21395 IN NS ns1.yahoo.com.
yahoo.com.		21395 IN NS ns6.yahoo.com.
yahoo.com.		21395 IN NS ns3.yahoo.com.
yahoo.com.		1595 IN	SOA ns1.yahoo.com. hostmaster.yahoo-inc.com. (
				2014011310 ; serial
				3600       ; refresh (1 hour)
				300        ; retry (5 minutes)
				1814400    ; expire (3 weeks)
				600        ; minimum (10 minutes)
				)

Where,

  1. +multiline – Print records like the SOA records in a verbose multi-line format with human-readable comments.
  2. +noall – Set or clear all display flags.
  3. +answer – Display [do not display] the answer section of a reply. The default is to display it.
  4. +nocmd – Toggles the printing of the initial comment in the output identifying the version of dig and the query options that have been applied. This comment is printed by default.

Examples and usage: Linux and Unix dig Command Examples