⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 host.1

📁 早期freebsd实现
💻 1
📖 第 1 页 / 共 2 页
字号:
.TH host 1 "930926".SH NAMEhost \- query nameserver about domain names and zones.SH SYNOPSIS .na.nf\fBhost\fP [\fB\-v\fP] [\fB\-a\fP] [\fB\-t\fP \fIquerytype\fP] [\fIoptions\fP]  \fIname\fP  [\fIserver\fP] .br\fBhost\fP [\fB\-v\fP] [\fB\-a\fP] [\fB\-t\fP \fIquerytype\fP] [\fIoptions\fP]  \fB\-l\fP \fIzone\fP  [\fIserver\fP] .br\fBhost\fP [\fB\-v\fP] [\fIoptions\fP]  \fB\-H\fP [\fB\-D\fP] [\fB\-E\fP] [\fB\-G\fP] \fIzone\fP.br\fBhost\fP [\fB\-v\fP] [\fIoptions\fP]  \fB\-C\fP \fIzone\fP.br\fBhost\fP [\fB\-v\fP] [\fIoptions\fP]  \fB\-A\fP \fIhost\fP.sp\fBhost\fP [\fIoptions\fP] \fB\-x\fP  [\fIname\fP ...].br\fBhost\fP [\fIoptions\fP] \fB\-X\fP \fIserver\fP  [\fIname\fP ...].SH DESCRIPTION .I hostlooks for information about Internet hosts and domain names.It gets this information from a set of interconnected serversthat are spread across the world. The information is storedin the form of "resource records" belonging to hierarchicallyorganized "zones"..PPBy default, the program simply converts between host names and Internetaddresses. However, with the \fB\-t\fP, \fB\-a\fP and \fB\-v\fPoptions, it can be used to find all of the information aboutdomain names that is maintained by the domain nameserver system.The information printed consists of various fields of theassociated resource records that were retrieved..PPThe arguments can be either host names (domain names) or numericInternet addresses..PPA numeric Internet address consists of four decimal numbersseparated by dots, e.g. \fB192.16.199.1\fP, representing thefour bytes of the 32-bit address..brThe default action is to look up the associated host name..PPA host name or domain name consists of component names (labels)separated by dots, e.g. \fBnikhefh.nikhef.nl\fP.brThe default action is to look up all of its Internet addresses..PPFor single names without a trailing dot, the local domain isautomatically tacked on the end.Thus a user in domain "nikhef.nl" can say "host nikhapo",and it will actually look up "nikhapo.nikhef.nl".In all other cases, the name is tried unchanged.Single names with trailing dot are considered top-level domainspecifications, e.g. "nl.".PPNote that the usual lookup convention for any name that does not endwith a trailing dot is to try first with the local domain appended,and possibly other search domains.This convention is not used by this program..PPThe actual suffix to tack on the end is usually the local domainas specified in the \fB/etc/resolv.conf\fP file, but this can beoverridden.See below for a description of how to customize the host name lookup..SH ARGUMENTSThe first argument is normally the host name (domain name) for whichyou want to look up the requested information.If the first argument is an Internet address, a query is done on thespecial "reversed mapping" domain to look up its associated host name..PPIf the \fB\-l\fP option is given, the first argument is a domain zonename for which a complete listing is given. The program enters aspecial zone listing mode which has several variants (see below)..PPThe second argument is optional. It allows you to specify a particularserver to query.  If you don't specify this argument, default serversare used, as defined by the \fB/etc/resolv.conf\fP file..SH EXTENDED SYNTAXIf the \fB\-x\fP option is given, it extends the syntax in the sensethat multiple arguments are allowed on the command line. An optionalexplicit server must now be specified using the \fB\-X\fP option as itcannot be given as an ordinary argument any more. The \fB\-X\fPoption implies \fB\-x\fP..spThe extended syntax allows no arguments at all, in which case thearguments will be read from standard input. This can be a pipe,redirection from a file, or an interactive terminal. Note thatthese arguments are the names to be queried, and not command options.Everything that appears after a '#' or ';' on an input line will beskipped. Multiple arguments per line are allowed..SH OPTIONSThere are a number of options that can be used before the specifiedarguments.  Some of these options are meaningful only to the peoplewho maintain the domain database zones.The first options are the regularly used ones..TP 4.B \-vcauses printout to be in a "verbose" format.All resource record fields are printed.Without this option, the TTL and class fields are not shown.Also the contents of the "additional information" and "authoritativenameservers" sections in the answer from the nameserver are printed,if present.  Normally these sections are not shown.In addition, the verbose option prints extra information about thevarious actions that are taken by the program.Note that \fB\-vv\fP is "very verbose". This generates a lot of output..TP.BI \-t " querytype"allows you to specify a particular type of resource record informationto be looked up.  Supported types are listed below.The wildcard may be written as either \fBANY\fP or \fB*\fP.Types may be given in upper or lower case.The default is type \fBA\fP for regular lookups,and \fBA\fP, \fBNS\fP, and \fBPTR\fP for zone listings..TP.B \-ais equivalent to \fB\-t ANY\fP.Note that this gives you "anything available" (currently cached) andnot "all defined data" if a non-authoritative server is queried..SH SPECIAL MODESThe following options put the program in a special mode..TP 4.BI \-l " zone"generates the listing of an entire zone..spE.g. the command.br	\fBhost \-l nikhef.nl\fP.brwill give a listing of all hosts in the "nikhef.nl" zone.The \fB\-t\fP option is used to filter what information isextracted, as you would expect. The default is addressinformation from A records, supplemented with data from PTRand NS records..spThe command.br	\fBhost \-v \-a \-l nikhef.nl\fP.brwill give a complete download of the zone data for "nikhef.nl",in the official master file format..TP 4.B \-Hcan be specified instead of the \fB\-l\fP option. It will printthe count of the unique hostnames (names with an A record)encountered within the zone.It will not count pseudo names like "localhost", nor addressesassociated with zone name itself. Neither are counted the"glue records" that are necessary to define nameservers forthe zone and its delegated zones..spBy default, this option will not print any resource records..spCombined with the \fB\-S\fP option, it will give a completestatistics survey of the zone..spThe host count may be affected by duplicate hosts (see below).To compute the most realistic value, subtract the duplicatehost count from the total host count..TP.B \-Gimplies \fB\-H\fP, but lists the names of gateway hosts.These are the hosts that have more than one address.Gateway hosts are not checked for duplicate addresses..TP.B \-Eimplies \fB\-H\fP, but lists the names of extrazone hosts.An extrazone host in zone "foo.bar" is of the form"host.xxx.foo.bar" where "xxx.foo.bar" is not defined asa delegated zone with an NS record.This may be intentional, but also may be an error..TP.B \-Dimplies \fB\-H\fP, but lists the names of duplicate hosts.These are hosts with only one address, which is known tohave been defined also for another host with a different name,possibly even in a different zone.This may be intentional, but also may be an error..TP.B \-Ccan be specified instead of the \fB\-l\fP option. It causes the SOArecords for the specified zone to be compared as found at each ofthe authoritative nameservers for the zone (as listed in the NS records).Nameserver recursion is turned off, and it will be checked whetherthe answers are really authoritative. If a server cannot provide anauthoritative SOA record, a lame delegation of the zone to that serveris reported.Discrepancies between the records are reported. Various sanity checksare performed..TP.B \-Aenters a special address check mode..spIf the first argument is a host name, its addresses will be retrieved,and for each of the addresses it will be checked whether they map backto the given host..spIf the first argument is a dotted quad Internet address, its name willbe retrieved, and it will be checked whether the given address is listedamong the known addresses belonging to that host..SH SPECIAL OPTIONSThe following options apply only to the special zone listing modes..TP 4.BI \-L " level"Recursively generate zone listings up to this level deep.Level 1 traverses the parent zone and all of its delegated zones.Each additional level descends into another layer of delegated zones..TP.B \-Sprints statistics about the various types of resource records foundduring zone listings, the number of various host classifications,the number of delegated zones, and some total statistics afterrecursive listings..TP.B \-pcauses only the primary nameserver of a zone to be contacted for zonetransfers during zone listings. Normally, zone transfers are obtainedfrom any one of the authoritative servers that responds.  Note thata specific server given on the command line overrules this option.The primary nameserver is obtained from the SOA record of the zone..SH COMMON OPTIONSThe following options can be used in both normal mode and domainlisting mode..TP 4.B \-Tprints the time-to-live values during non-verbose output.By default the TTL is shown only in verbose mode.It also prints the preference value for MX records..TP.B \-dturns on debugging.  Nameserver transactions are shown in detail.Note that \fB\-dd\fP prints even more debugging output..TP.B \-eexcludes information about names that are not residing withinthe given zone during zone listings, such as some glue records.For regular queries, it suppresses the printing of the "additionalinformation" and "authoritative nameserver" sections in the answerfrom the nameserver..TP.BI \-f " filename"writes the resource record output to the given logfile as well asto standard output..TP.BI \-F " filename"same as \fB\-f\fP, but exchange the role of stdout and logfile.All stdout output goes to the logfile, and stdout gets only theextra resource record output (so that it can be used in pipes).This option is supported on a few platforms only..TP.B \-iconstructs a query for the "reversed mapping" \fBin-addr.arpa\fPdomain in case a numeric (dotted quad) address was specified.Useful primarily for zone listing mode, since for numeric regularlookups such query is done anyway (but with \-i you see the actual

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -