host
时间:2006-08-13 来源:anima
host
host [options] name [server]
System administration command. Print information about hosts or zones in DNS. Hosts may be IP addresses or hostnames; host converts IP addresses to hostnames by default and appends the local domain to hosts without a trailing dot. Default servers are determined in /etc/resolv.conf. For more information about hosts and zones, read Chapters 1 and 2 of DNS and BIND (O'Reilly).
Options
-aSame as -t ANY.
-c classSearch for specified resource record class (IN, CH, CHAOS, HS, HESIOD, or ANY). Default is IN.
-dVerbose output. Same as -v.
-lList mode. This also performs a zone transfer for the named zone. Same as -t AXFR.
-nPerform reverse lookups for IPv6 addresses using IP6.INT domain and "nibble" labels instead of IP6.ARPA and binary labels.
-rDo not ask contacted server to query other servers, but require only the information that it has cached.
-t typeLook for type entries in the resource record. type may be any recognized query type, such as A, AXFR, CNAME, NS, SOA, SIG, or ANY. If name is a hostname, host will look for A records by default. If name is an IPv4 or IPv6 address, it will look for PTR records.
-vVerbose. Include all fields from resource record, even time-to-live and class, as well as "additional information" and "authoritative nameservers" (provided by the remote nameserver).
-wNever give up on queried server.
-CDisplay SOA records from all authoritative nameservers for the specified zone.
-N nConsider names with fewer than n dots in them to be relative. Search for them in the domains listed in the search and domain directives of /etc/resolv.conf. The default is usually 1.
-R nRetry query a maximum of n times. The default is 1.
-TUse TCP instead of UDP to query nameserver. This is implied in queries that require TCP, such as AXFR requests.
-W nWait a maximum of n seconds for reply.