📄 1261-1262.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="1257-1260.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1263-1265.html">Next</A></CENTER></P>
<A NAME="PAGENUM-1261"><P>Page 1261</P></A>
<P>These examples assume you use the simpleinit(8)
init program for Linux. If you use a SysV-like
init (does /etc/inittab mention "respawn"?), refer to the appropriate manual page.
</P>
<P><B>ISSUE ESCAPES</B>
</P>
<P>The /etc/issue file might contain certain escape codes to display the system name, date and time, and so on. All
escape codes consist of a backslash (\) immediately followed by one of the following letters:
</P>
<TABLE>
<TR><TD>
b
</TD><TD>
Insert the baudrate of the current line.
</TD></TR><TR><TD>
d
</TD><TD>
Insert the current date.
</TD></TR><TR><TD>
s
</TD><TD>
Insert the system name, the name of the operating system.
</TD></TR><TR><TD>
l
</TD><TD>
Insert the name of the current tty line.
</TD></TR><TR><TD>
m
</TD><TD>
Insert the architecture identifier of the machine, such as
i486.
</TD></TR><TR><TD>
n
</TD><TD>
Insert the nodename of the machine, also known as the hostname.
</TD></TR><TR><TD>
o
</TD><TD>
Insert the domain name of the machine.
</TD></TR><TR><TD>
r
</TD><TD>
Insert the release number of the OS, such as 1.1.9.
</TD></TR><TR><TD>
t
</TD><TD>
Insert the current time.
</TD></TR><TR><TD>
u
</TD><TD>
Insert the number of current users logged in.
</TD></TR><TR><TD>
U
</TD><TD>
Insert the string 1 user or n users where
n is the number of current users logged in.
</TD></TR><TR><TD>
v
</TD><TD>
Insert the version of the OS, such as the build date and so on.
</TD></TR></TABLE>
<P>For example, on my system, the following /etc/issue file
</P>
<!-- CODE SNIP //-->
<PRE>
This is \n.\o (\s\m\r) \t
</PRE>
<!-- END CODE SNIP //-->
<P>displays as
</P>
<!-- CODE SNIP //-->
<PRE>
This is thingol.orcan.dk (Linux i386 1.1.9) 18:29:30
</PRE>
<!-- END CODE SNIP //-->
<P><B>FILES</B>
</P>
<P>/var/run/utmp, the system status file
</P>
<P>/etc/issue, printed before the login prompt (System V only)
</P>
<P>/dev/console, problem reports (if syslog(3) is not used)
</P>
<P>/etc/inittab (Linux simpleinit(8) configuration file)
</P>
<P><B>BUGS</B>
</P>
<P>The baud-rate detection feature (the -m option) requires that
agetty be scheduled soon enough after completion of a
dial-in call (within 30ms with modems that talk at 2400 baud). For robustness, always use the
-m option in combination with a multiple baud rate command-line argument so that break processing is enabled.
</P>
<P>The text in the /etc/issue file and the login prompt are always output with 7-bit characters and space parity.
</P>
<P>The baud-rate detection feature (the -m option) requires that the modem emits its status message after raising the DCD line.
</P>
<P><B>DIAGNOSTICS</B>
</P>
<P>Depending on how the program was configured, all diagnostics are written to the console device or reported via
the syslog(3) facility. Error messages are produced if the port argument does not specify a terminal device, if there is no
utmp entry for the current process (System V only), and so on.
</P>
<P><B>AUTHORS</B>
</P>
<P>W.Z. Venema (wietse@wzv.win.tue.nl) Eindhoven University of Technology, Department of Mathematics and
Computer Science, Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands.
</P>
<P>Peter Orbaek (poe@daimi.aau.dk), Linux port.
</P>
<A NAME="PAGENUM-1262"><P>Page 1262</P></A>
<P><B>CREATION DATE</B>
</P>
<P>Sat Nov 25 22:51:05 MET 1989
<P>
<P><B>LAST MODIFICATION</B>
</P>
<P>91/09/01 23:22:00
</P>
<P><B>VERSION/RELEASE</B>
</P>
<P>1.29
</P>
<H3><A NAME="ch08_ 5">
archive
</A></H3>
<!-- CODE SNIP //-->
<PRE>
archive—Usenet article archiver.
</PRE>
<!-- END CODE SNIP //-->
<P><B>SYNOPSIS</B>
</P>
<!-- CODE SNIP //-->
<PRE>
archive [ -a archive ][-f ][-i index ][-m ][-r ][input ]
</PRE>
<!-- END CODE SNIP //-->
<P><B>DESCRIPTION</B>
</P>
<P>archive makes copies of files specified on its standard input. It is usually run either as a channel feed under
innd(8) or by a script before expire(8) is run.
</P>
<P>archive reads the named input file or standard input if no file is given. The input is taken as a set of lines. Blank lines
and lines starting with a number sign (#) are ignored. All other lines should specify the name of a file to archive. If a filename
is not an absolute pathname, it is taken to be relative to /news/spool.
</P>
<P>Files are copied to a directory within the archive directory,
/news/spool/news.archive. The default is to create a
hierarchy that mimics the input files; intermediate directories are created as needed. For example, the input file
comp/sources/unix/2211 (article 2211 in the newsgroup
comp.sources.unix) is copied to
/news/spool/news.archive/comp/sources/unix/2211. If the
_f flag is used, then all directory names are flattened out, replacing the slashes with periods. In this case, the
file is copied to
/news/spool/news.archive/comp.sources.unix/2211.
</P>
<P>If the _i flag is used, then archive appends one line to the specified index file for each article that it copies. This
line contains the destination name and the Message-ID and Subject headers.
</P>
<P>For example, a typical newsfeeds(5) entry to archive most source newsgroups is as follows:
</P>
<!-- CODE SNIP //-->
<PRE>
source-archive\
:!*,*sources*,!*wanted*,!*.d\
:Tc,Wn\
:/archive _f _i \
/usr/spool/news/news.archive/INDEX
</PRE>
<!-- END CODE SNIP //-->
<P>Files are copied by making a link. If that fails, a new file is created. If the
_m flag is used, then the file is copied to the destination, and the input file is replaced with a symbolic link pointing to the new file. The
_m flag is ignored.
</P>
<P>By default, archive sets its standard error to
/var/log/news/errlog. To suppress this redirection, use the
_r flag.
</P>
<P>If the input is exhausted, archive exits with a zero status. If an I/O error occurs, it tries to spool its input, copying it to a
file. If there was no input filename, the standard input is copied to
/news/spool/out.going/archive and the program exits.
If an input filename was given, a temporary file named
input.bch (if input is an absolute pathname) or
/news/spool/out.going/input.bch (if the filename does not begin with a slash) is created. Once the input is copied, archive tries
to rename this temporary file to be the name of the input file and then exits.
</P>
<P><B>HISTORY</B>
<P>
<P>Written by Rich $alz (rsalz@uunet.uu.net) for InterNetNews.
</P>
<P><CENTER>
<a href="1257-1260.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1263-1265.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -