📄 dig.docbook
字号:
</para> </refsect1> <refsect1> <title>QUERY OPTIONS</title> <para><command>dig</command> provides a number of query options which affect the way in which lookups are made and the results displayed. Some of these set or reset flag bits in the query header, some determine which sections of the answer get printed, and others determine the timeout and retry strategies. </para> <para> Each query option is identified by a keyword preceded by a plus sign (<literal>+</literal>). Some keywords set or reset an option. These may be preceded by the string <literal>no</literal> to negate the meaning of that keyword. Other keywords assign values to options like the timeout interval. They have the form <option>+keyword=value</option>. The query options are: <variablelist> <varlistentry> <term><option>+[no]tcp</option></term> <listitem> <para> Use [do not use] TCP when querying name servers. The default behaviour is to use UDP unless an AXFR or IXFR query is requested, in which case a TCP connection is used. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]vc</option></term> <listitem> <para> Use [do not use] TCP when querying name servers. This alternate syntax to <parameter>+[no]tcp</parameter> is provided for backwards compatibility. The "vc" stands for "virtual circuit". </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]ignore</option></term> <listitem> <para> Ignore truncation in UDP responses instead of retrying with TCP. By default, TCP retries are performed. </para> </listitem> </varlistentry> <varlistentry> <term><option>+domain=somename</option></term> <listitem> <para> Set the search list to contain the single domain <parameter>somename</parameter>, as if specified in a <command>domain</command> directive in <filename>/etc/resolv.conf</filename>, and enable search list processing as if the <parameter>+search</parameter> option were given. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]search</option></term> <listitem> <para> Use [do not use] the search list defined by the searchlist or domain directive in <filename>resolv.conf</filename> (if any). The search list is not used by default. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]showsearch</option></term> <listitem> <para> Perform [do not perform] a search showing intermediate results. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]defname</option></term> <listitem> <para> Deprecated, treated as a synonym for <parameter>+[no]search</parameter> </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]aaonly</option></term> <listitem> <para> Sets the "aa" flag in the query. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]aaflag</option></term> <listitem> <para> A synonym for <parameter>+[no]aaonly</parameter>. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]adflag</option></term> <listitem> <para> Set [do not set] the AD (authentic data) bit in the query. The AD bit currently has a standard meaning only in responses, not in queries, but the ability to set the bit in the query is provided for completeness. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]cdflag</option></term> <listitem> <para> Set [do not set] the CD (checking disabled) bit in the query. This requests the server to not perform DNSSEC validation of responses. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]cl</option></term> <listitem> <para> Display [do not display] the CLASS when printing the record. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]ttlid</option></term> <listitem> <para> Display [do not display] the TTL when printing the record. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]recurse</option></term> <listitem> <para> Toggle the setting of the RD (recursion desired) bit in the query. This bit is set by default, which means <command>dig</command> normally sends recursive queries. Recursion is automatically disabled when the <parameter>+nssearch</parameter> or <parameter>+trace</parameter> query options are used. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]nssearch</option></term> <listitem> <para> When this option is set, <command>dig</command> attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]trace</option></term> <listitem> <para> Toggle tracing of the delegation path from the root name servers for the name being looked up. Tracing is disabled by default. When tracing is enabled, <command>dig</command> makes iterative queries to resolve the name being looked up. It will follow referrals from the root servers, showing the answer from each server that was used to resolve the lookup. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]cmd</option></term> <listitem> <para> toggles the printing of the initial comment in the output identifying the version of <command>dig</command> and the query options that have been applied. This comment is printed by default. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]short</option></term> <listitem> <para> Provide a terse answer. The default is to print the answer in a verbose form. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]identify</option></term> <listitem> <para> Show [or do not show] the IP address and port number that supplied the answer when the <parameter>+short</parameter> option is enabled. If short form answers are requested, the default is not to show the source address and port number of the server that provided the answer. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]comments</option></term> <listitem> <para> Toggle the display of comment lines in the output. The default is to print comments. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]stats</option></term> <listitem> <para> This query option toggles the printing of statistics: when the query was made, the size of the reply and so on. The default behaviour is to print the query statistics. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]qr</option></term> <listitem> <para> Print [do not print] the query as it is sent. By default, the query is not printed. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]question</option></term> <listitem> <para> Print [do not print] the question section of a query when an answer is returned. The default is to print the question section as a comment. </para> </listitem> </varlistentry> <varlistentry> <term><option>+[no]answer</option></term> <listitem> <para> Display [do not display] the answer section of a reply. The default is to display it. </para>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -