📄 1263-1265.html
字号:
<HTML>
<HEAD>
<TITLE>Linux Complete Command Reference:Administration and Privileged Commands:EarthWeb Inc.-</TITLE>
</HEAD>
<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=0672311046 //-->
<!-- TITLE=Linux Complete Command Reference//-->
<!-- AUTHOR=Red Hat//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=08 //-->
<!-- PAGES=1257-1422 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="1261-1262.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1266-1266.html">Next</A></CENTER></P>
<A NAME="PAGENUM-1263"><P>Page 1263</P></A>
<P><B>SEE ALSO</B>
</P>
<!-- CODE SNIP //-->
<PRE>
newsfeeds(5)
</PRE>
<!-- END CODE SNIP //-->
<H3><A NAME="ch08_ 6">
arp
</A></H3>
<P>arp—Manipulate the system ARP cache.
</P>
<P><B>SYNOPSIS</B>
</P>
<!-- CODE SNIP //-->
<PRE>
arp [-v] [-t type] -a [hostname]
arp [-v] -d hostname ...
arp [-v] [-t type] -s hostname hw_addr
arp [-v] -f filename
</PRE>
<!-- END CODE SNIP //-->
<P><B>DESCRIPTION</B>
</P>
<P>arp manipulates the kernel's ARP cache in various ways. The primary options are clearing an address mapping entry
and manually setting up one. For debugging purposes, the
arp program also allows a complete dump of the ARP cache.
</P>
<P><B>OPTIONS</B></P>
<TABLE>
<TR><TD>
-v
</TD><TD>
Tell the user what is going on by being verbose.
</TD></TR><TR><TD>
-t type
</TD><TD>
When setting or reading the ARP cache, this optional parameter tells
arp which class of entries it should check for. The default value of this parameter is
ether (hardware code 0x01 for IEEE 802.3 10Mbps Ethernet). Other values might include
network technologies such as ARCnet (arcnet), PROnet
(pronet), and AX.25 (ax25).
</TD></TR><TR><TD>
-a [hostname]
</TD><TD>
Shows the entries of the specified hosts. If the
hostname parameter is not used, all entries are displayed.
</TD></TR><TR><TD>
-d hostname
</TD><TD>
Remove the entries of the specified host. This can be used if the indicated host
is brought down, for example.
</TD></TR><TR><TD>
-s hostname hw_addr
</TD><TD>
Manually create an ARP address mapping entry for host
hostname with hardware address set to hw_addr. The format of the hardware address is dependent on
the hardware class, but for most classes, you can assume that the usual presentation
can be used. For the Ethernet class, this is six bytes in hexadecimal, separated by colons.
</TD></TR><TR><TD>
-f filename
</TD><TD>
Similar to the -s option, only this time the address info is taken from file
filename. This can be used if ARP entries for a lot of hosts have to be set up. The name of
the data file is often /etc/ethers, but this is not official.
</TD></TR><TR><TD>
</TD><TD>
The format of the file is simple; it only contains ASCII text lines with a
hostname and a hardware address separated by whitespace.
</TD></TR></TABLE>
<P>In all places where a hostname is expected, you can also enter an IP address in dotted-decimal notation.
</P>
<P><B>FILES</B>
</P>
<!-- CODE SNIP //-->
<PRE>
/proc/net/arp
/etc/ethers
</PRE>
<!-- END CODE SNIP //-->
<P><B>AUTHOR</B>
</P>
<P>Fred N. van Kempen (waltje@uwalt.nl.mugnet.org)
</P>
<P>09 June 1994
</P>
<A NAME="PAGENUM-1264"><P>Page 1264</P></A>
<H3><A NAME="ch08_ 7">
badblocks
</A></H3>
<P>badblocks—Search a device for bad blocks.
</P>
<P><B>SYNOPSIS</B>
</P>
<!-- CODE SNIP //-->
<PRE>
badblocks [ -b block-size ] [ -o output_file ] [ -v ][-w ] device blocks-count
</PRE>
<!-- END CODE SNIP //-->
<P><B>DESCRIPTION</B>
</P>
<P>badblocks is used to search for bad blocks on a device (usually a disk partition).
device is the special file corresponding to the device (such as
/dev/hdXX). blocks-count is the number of blocks on the device.
</P>
<P><B>OPTIONS</B>
</P>
<TABLE>
<TR><TD>
-b block-size
</TD><TD>
Specify the size of blocks in bytes.
</TD></TR><TR><TD>
-o output_file
</TD><TD>
Write the list of bad blocks to the specified file. Without this option,
badblocks displays the list on its standard output.
</TD></TR><TR><TD>
-v
</TD><TD>
Verbose mode.
</TD></TR><TR><TD>
-w
</TD><TD>
Use write-mode test. With this option,
badblocks scans for bad blocks by writing some patterns (0xaa, 0x55, 0xff, and 0x00) on every block of the device,
reading every block and comparing the contents.
</TD></TR></TABLE>
<P><B>WARNING</B>
</P>
<P>Never use the -w option on a device containing an existing filesystem. This option erases data!
</P>
<P><B>AUTHOR</B>
</P>
<P>badblocks was written by Remy Card
(card@masi.ibp.fr), the developer and maintainer of the
ext2 fs.
</P>
<P><B>BUGS</B>
</P>
<P>I had no chance to make real tests of this program because I use IDE drives, which remap bad blocks. I only made some
tests on floppies.
</P>
<P><B>AVAILABILITY</B>
</P>
<P>badblocks is available for anonymous FTP from
ftp.ibp.fr and tsx-11.mit.edu in
/pub/linux/packages/ext2fs.
</P>
<P><B>SEE ALSO</B>
</P>
<!-- CODE SNIP //-->
<PRE>
e2fsck(8), mke2fs(8)
</PRE>
<!-- END CODE SNIP //-->
<P>Version 0.5b, November 1994
</P>
<H3><A NAME="ch08_ 8">
buffchan
</A></H3>
<P>buffchan—Buffered file-writing back end for InterNetNews.
</P>
<P><B>SYNOPSIS</B>
</P>
<!-- CODE SNIP //-->
<PRE>
buffchan [ -b ][-c lines ][-C seconds ][-d directory ]
[-f fields ][-m map ][-p pidfile ][-l lines ][-L seconds ]
[-r ][-s file_format ][-u ]
</PRE>
<!-- END CODE SNIP //-->
<P><B>DESCRIPTION</B>
</P>
<P>buffchan reads lines from standard input and copies certain fields in each line into files named by other fields within
the line. buffchan is intended to be called by
innd(8) as an exploder feed.
</P>
<A NAME="PAGENUM-1265"><P>Page 1265</P></A>
<P>buffchan input is interpreted as a set of lines. Each line contains a fixed number of initial fields, followed by a
variable number of filename fields. All fields in a line are separated by whitespace. The default number of initial fields is one; the
_f flag may be used to specify a different number of fields. See
filechan(8) for an example.
</P>
<P>After the initial fields, each remaining field names a file to write. The
-s flag may be used to specify a format string that
maps the field to a filename. This is a sprintf(3) format string, which should have a single
%s parameter that is given the field. The default value is
/news/spool/out.going/%s. See the description of this flag in
filechan(8). The _d flag may be used to specify a directory the program should change to before starting. If this flag is used, then the default for the
_s flag is changed to be a simple %s.
</P>
<P>Once buffchan opens a file, it keeps it open. The input must therefore never specify more files than the number of
available descriptors can keep open. If the _b flag is used, the program will allocate a buffer and attach it to the file using
setbuf(3). If the _u flag is used, the program will request unbuffered output.
</P>
<P>If the _l flag is used with a number n, then
buffchan will call fflush(3) after every n lines are written to a file. If the
_c flag is used with a number n, then buffchan will close, and reopen, a file after every
n lines are written to a file.
</P>
<P>If the _L flag is used with a number n, then all files will be flushed every
n seconds. Similarly, the _C flag may be used to specify that all files should be closed and reopened every
n seconds.
</P>
<P>By default, the program sets its standard error to
/var/log/news/errlog. To suppress this redirection, use the
_r flag.
</P>
<P>If the _p flag is used, the program will write a line containing its process ID (in text) to the specified file.
</P>
<P>buffchan can be invoked as an exploder feed (see
newsfeeds(5)). As such, if a line starts with an exclamation point, it
is treated as a command. There are three commands:
</P>
<TABLE>
<TR><TD>
flush
</TD><TD>
The flush command closes and reopens all open files;
flush xxx flushes only the specified site. These are analogous to the
ctlinnd(8) flush command and can be achieved by doing a
send flush xxx command. Applications can tell that the
flush has completed by renaming the file before issuing the command;
buffchan has completed the command when the original filename reappears.
</TD></TR><TR><TD>
</TD><TD>
buffchan also changes the access permissions of the file from read-only for
everyone to read-write for owner and group as it flushes or closes each output file. It
changes the modes back to read-only if it reopens the same file.
</TD></TR><TR><TD>
drop
</TD><TD>
The drop command is similar to the
flush command except that any files are not reopened. If given an argument, then the specified site is dropped; otherwise, all
sites are dropped. (Note that the site will be restarted if the input stream mentions
the site.) When a ctlinnd "drop site" command is sent,
innd will automatically forward the command to
buffchan if the site is a funnel that feeds into this exploder.
To drop all sites, use the ctlinnd send buffchan-site
drop command.
</TD></TR><TR><TD>
readmap
</TD><TD>
The map file (specified with the _m flag) is reloaded.
</TD></TR></TABLE>
<P><B>HISTORY</B>
</P>
<P>Written by Rich $alz (rsalz@uunet.uu.net) for InterNetNews.
</P>
<P><B>SEE ALSO</B>
</P>
<!-- CODE SNIP //-->
<PRE>
ctlinnd(8), filechan(8), innd(8), newsfeeds(5).
</PRE>
<!-- END CODE SNIP //-->
<H3><A NAME="ch08_ 9">
cfdisk
</A></H3>
<P>cfdisk—Curses-based disk partition table manipulator for Linux.
</P>
<P><B>SYNOPSIS</B>
</P>
<!-- CODE SNIP //-->
<PRE>
cfdisk [ -avz ] [ -c cylinders ][-h heads ][-s sectors-per-track ][-P opt ]
[device ]
</PRE>
<!-- END CODE SNIP //-->
<P><CENTER>
<a href="1261-1262.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1266-1266.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -