📄 457-461.html
字号:
<HTML>
<HEAD>
<TITLE>Linux in Plain English:Linux Commands Organized by Group</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!--ISBN=1558285423//-->
<!--TITLE=Linux in Plain English//-->
<!--AUTHOR=Patrick Volkerding//-->
<!--AUTHOR=Kevin Reichard//-->
<!--PUBLISHER=IDG Books Worldwide, Inc.//-->
<!--IMPRINT=M & T Books//-->
<!--CHAPTER=5//-->
<!--PAGES=457-461//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="450-456.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="462-465.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P><FONT SIZE="+1"><B>dnsquery......<TT>Query DNS Server</TT></B></FONT></P>
<P><B>dnsquery</B> <I>option(s)</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>dnsquery</B> command queries nameservers via BIND resolver library calls.</P>
<P><FONT SIZE="+1"><B><I>OPTIONS</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="30%" VALIGN="TOP"><B>-n <I>nameserver</I></B>
<TD WIDTH="70%" COLSPAN="2">Specifies the nameserver, either by IP addresses or domain name.
<TR>
<TD VALIGN="TOP"><B>-t <I>type</I></B>
<TD COLSPAN="2">Sets the type of resource record of interest, one of the following:
<TR>
<TD>
<TD WIDTH="30%"><B>A</B>
<TD WIDTH="40%">address
<TR>
<TD>
<TD><B>NS</B>
<TD>nameserver
<TR>
<TD>
<TD><B>CNAME</B>
<TD>canonical name
<TR>
<TD>
<TD><B>PTR</B>
<TD>domain-name pointer
<TR>
<TD>
<TD><B>SOA</B>
<TD>start of authority
<TR>
<TD>
<TD><B>WKS</B>
<TD>well-known service
<TR>
<TD>
<TD><B>HINFO</B>
<TD>host information
<TR>
<TD>
<TD><B>MINFO</B>
<TD>mailbox information
<TR>
<TD>
<TD><B>MX</B>
<TD>mail exchange
<TR>
<TD>
<TD><B>RP</B>
<TD>responsible person
<TR>
<TD>
<TD><B>MG</B>
<TD>mail group member
<TR>
<TD>
<TD><B>AFSDB</B>
<TD>DCE or AFS server
<TR>
<TD>
<TD><B>ANY</B>
<TD>wildcard
<TR>
<TD VALIGN="TOP"><B>-c <I>class</I></B>
<TD COLSPAN="2">Sets the class of resource records of interest, one of the following:
<TR>
<TD>
<TD WIDTH="30%"><B>IN</B>
<TD WIDTH="40%">Internet
<TR>
<TD>
<TD><B>HS</B>
<TD>Hesiod
<TR>
<TD>
<TD><B>CHAOS</B>
<TD>Chaos
<TR>
<TD>
<TD><B>ANY</B>
<TD>wildcard
<TR>
<TD><B>-p <I>num</I></B>
<TD COLSPAN="2">Specifies the period to wait before timing out.
<TR>
<TD VALIGN="TOP"><B>-r <I>num</I></B>
<TD COLSPAN="2">Sets the number of times to retry if the nameserver doesn’t respond.
<TR>
<TD><B>-s</B>
<TD COLSPAN="2">Uses a stream rather than a packet.
</TABLE>
<P><FONT SIZE="+1"><B>faucet......<TT>Network Pipe Repair</TT></B></FONT></P>
<P><B>faucet</B> <I>option(s) port</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>faucet</B> command is a fixture for a BSD network pipe, providing the functionality of pipes over the network. It behaves as the server end of a server-client connection and works well with <B>hose</B>, especially when you don’t have easy access to the destination account (such as a root account where <B>.rhosts</B> are a bad idea). Basically, <B>faucet</B> creates a BSD socket, binds it to the <I>port</I> specified on the command line, and listens for connections. Every time <B>faucet</B> gets a connection, it runs <I>command</I> and its <I>args</I>.</P>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>WARNING: </B>The <B>faucet</B> command is not considered to be a very secure method of networking. Use with caution.<HR></FONT>
</BLOCKQUOTE>
<P><FONT SIZE="+1"><B><I>OPTIONS</I></B></FONT></P>
<P>There are many more options with this command; these are the most frequently used. Check the online-manual page for a full listing.
</P>
<TABLE WIDTH="100%"><TR>
<TD WIDTH="35%" VALIGN="TOP"><B>-localhost</B>
<TD WIDTH="65%">Specifies that the listening socket should be bound to a specific Internet address on the local host.
<TR>
<TD VALIGN="TOP"><B>-daemon</B>
<TD>Specifies that <B>faucet</B> should disassociate from the controlling terminal once it has started listening on the socket, using the <B>setsid()</B> system call.
<TR>
<TD VALIGN="TOP"><B>-shutdown</B>
<TD>Turns the bidirectional socket into a unidirectional socket.
<TR>
<TD VALIGN="TOP"><B>-serial</B>
<TD>Tells <B>faucet</B> to wait for one child to finish before accepting any more connections.
<TR>
<TD VALIGN="TOP"><B>-pidfile <I>filename</I></B>
<TD>Write its process ID into <I>filename</I>.
</TABLE>
<P><FONT SIZE="+1"><B>fuser......<TT>File Users</TT></B></FONT></P>
<P><B>fuser</B> <I>option(s) filename(s)</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>fuser</B> filename lists the process IDs of those, using a particular file or filesystem. Information returned includes the following:</P>
<TABLE WIDTH="100%"><TR>
<TD WIDTH="20%"><B>c</B>
<TD WIDTH="80%">Current directory
<TR>
<TD><B>e</B>
<TD>Executable file
<TR>
<TD><B>f</B>
<TD>Open file
<TR>
<TD><B>m</B>
<TD>Mapped file or shared library
<TR>
<TD><B>r</B>
<TD>Root directory
</TABLE>
<P><FONT SIZE="+1"><B><I>OPTIONS</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="20%"><B>-</B>
<TD WIDTH="80%">Resets options to defaults.
<TR>
<TD VALIGN="TOP"><B>-<I>signal</I></B>
<TD>Sends a <I>signal</I> to a process. Use <B>-l</B> to see a list of the signal names.
<TR>
<TD><B>-a</B>
<TD>Shows all files, not just the ones being accessed.
<TR>
<TD><B>-k</B>
<TD>Kills all the processes accessing the file.
<TR>
<TD><B>-l</B>
<TD>Returns a list of the signal names.
<TR>
<TD><B>-m</B>
<TD>Returns information about a mounted filesystem.
<TR>
<TD><B>-s</B>
<TD>Runs in silent mode.
<TR>
<TD><B>-u</B>
<TD>Returns names of the users of the processes.
<TR>
<TD VALIGN="TOP"><B>-v</B>
<TD>Works in verbose mode, returning process ID, username, command name, and access fields.
</TABLE>
<P><FONT SIZE="+1"><B>getpeername......<TT>Get Peername</TT></B></FONT></P>
<P><B>getpeername</B> <I>option(s)</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>getpeername</B> returns information about a socket connection.</P>
<P><FONT SIZE="+1"><B><I>OPTIONS</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="20%"><B><I>fd</I></B>
<TD WIDTH="80%">Specifies file descriptors.
<TR>
<TD><B>-verbose</B>
<TD>Returns more detailed information.
</TABLE>
<P><FONT SIZE="+1"><B>hose......<TT>End of Network Pipe</TT></B></FONT></P>
<P><B>hose</B> <I>option(s)</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>hose</B> command is a fixture for a BSD network pipe, providing the functionality of pipes over the network. It behaves as the client end of a server-client connection and works well with <B>faucet</B>, especially when you don’t have easy access to the destination account (such as a root account, where <B>.rhosts</B> are a bad idea). Basically, <B>hose</B> creates a BSD socket, binds it to the <I>port</I> specified on the command line, and listens for connections. Every time <B>hose</B> gets a connection, it runs <I>command</I> and its <I>args</I>.</P>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>WARNING: </B>The <B>faucet</B> command is not considered to be a very secure method of networking. Use with caution.<HR></FONT>
</BLOCKQUOTE>
<P><FONT SIZE="+1"><B><I>OPTIONS</I></B></FONT></P>
<P>There are many more options with this command; these are the most frequently used. Check the online-manual page for a full listing.
</P>
<TABLE WIDTH="100%"><TR>
<TD WIDTH="30%"><B>-delay <I>n</I></B>
<TD WIDTH="70%">Specifies how many <I>n</I> seconds to wait between tries.
<TR>
<TD><B>-retry <I>n</I></B>
<TD>Specifies that connections should be retried <I>n</I> times.
<TR>
<TD><B>-shutdown r</B>
<TD>Makes it a read-only socket.
<TR>
<TD><B>-shutdown w</B>
<TD>Makes it a write-only socket.
<TR>
<TD VALIGN="TOP"><B>-unix</B>
<TD>Specifies that <I>port</I> is not an Internet port number or service name, but rather a filename for a UNIX domain socket.
</TABLE>
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="450-456.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="462-465.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -