O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

dig

Synopsis

dig [@server] host [querytype] [queryclass] [options]

Queries Internet domain name servers. Like the nslookup command, dig displays information about host as returned by the default or a specified nameserver. With dig, you specify all aspects of the query on the command line; there's no interactive mode as with nslookup.

Specify the nameserver to query with @ server, using either a domain name or an IP in server. The default is to query the nameservers in resolv.conf. Specify the type of query in querytype; the default is to look up address records. The supported types are:

A

Host's Internet address.

ANY

Any available information (default).

AXFR

Request zone transfer.

HINFO

Host CPU and operating system type.

MX

Mail exchanger.

NS

Nameserver for the named zone.

SOA

Domain start-of-authority.

Use queryclass to specify query class of either IN (Internet) or ANY. Default is IN.

Options

The following descriptions cover dig's basic operation; for a complete description, refer to dig's manpage.

-x address

Reverse map address, which allows you to locate a hostname when only an IP number is available. Implies ANY as the query type.

-p port

Send queries to the specified port instead of port 53, the default.

+norec[urse]

Turn off recursion (on by default).

+trace

Iteratively trace queries from the root servers. Show the results of each subquery as it resolves from the root servers to the final destination.

+vc

Send TCP-based queries (queries are UDP by default).

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required