📄 0084-0085.html
字号:
<HTML>
<HEAD>
<TITLE>Linux Complete Command Reference:User 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=01 //-->
<!-- PAGES=0001-0736 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="0083-0083.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0086-0086.html">Next</A></CENTER></P>
<A NAME="PAGENUM-84"><P>Page 84</P></A>
<TABLE>
<TR><TD>
_$
</TD><TD>
Forbid the use of $ in identifiers. This is required for ANSI conformance.
gcc automatically supplies this option to the preprocessor if you specify
_ansi, but gcc doesn't recognize the _$ option itself; to use it without the other effects of
_ansi, you must call the preprocessor directly.
</TD></TR></TABLE>
<P><B>
SEE ALSO
</B></P>
<P>cpp entry in info; The C Preprocessor, Richard M. Stallman.
</P>
<P>gcc(1); gcc entry in info; Using and Porting GNU
CC (for version 2.0), Richard M. Stallman.</P>
<P><B>
COPYING
</B></P>
<P>Copyright " 1991, 1992, 1993 Free Software Foundation, Inc. Permission is granted to make and distribute
verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
</P>
<P>Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim
copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
</P>
<P>Permission is granted to copy and distribute translations of this manual into another language, under the above
conditions for modified versions, except that this permission notice may be included in translations approved by the Free
Software Foundation instead of in the original English.
</P>
<P>GNU Tools, 30 April 1993
</P>
<H3><A NAME="ch01_ 44">
crontab
</A></H3>
<P>crontab—Manipulate per-user crontabs (Dillon's Cron)
</P>
<P><B>
SYNOPSIS
</B></P>
<P>crontab file [-u user] Replace crontab from
file
</P>
<TABLE>
<TR><TD>
crontab - [-u user]
</TD><TD>
Replace crontab from stdin
</TD></TR><TR><TD>
crontab -l [user]
</TD><TD>
List crontab for user
</TD></TR><TR><TD>
crontab -e [user]
</TD><TD>
Edit crontab for user
</TD></TR><TR><TD>
crontab -d [user]
</TD><TD>
Delete crontab for user
</TD></TR><TR><TD>
crontab -c dir
</TD><TD>
Specify crontab directory
</TD></TR></TABLE>
<P><B>
DESCRIPTION
</B></P>
<P>crontab manipulates the crontab for a particular user. Only the superuser may specify a different user and/or
crontab directory. Generally, the -e option is used to edit your
crontab. crontab will use /usr/bin/vi or the editor specified by
your VISUAL environment variable to edit the
crontab.
</P>
<P>Unlike other crond/crontabs, this crontab does not try to do everything under the sun. Frankly, a shell script is much
more able to manipulate the environment than cron, and I see no particular reason to use the user's shell (from his password
entry) to run cron commands when this requires special casing of nonuser
crontabs, such as those for UUCP. When a crontab command is run, this
crontab runs it with /bin/sh and sets up only three environment variables:
USER, HOME, and SHELL.
</P>
<P>crond automatically detects changes in the time. Reverse-indexed time changes less then an hour old will NOT rerun
crontab commands already issued in the recovered period. Forward-indexed changes less then an hour into the future will
issue missed commands exactly once. Changes greater then an hour into the past or future cause
crond to resynchronize and not issue missed commands. No attempt will be made to issue commands lost due to a reboot, and commands are not reissued
if the previously issued command is still running. For example, if you have a
crontab command sleep 70 that you wish to run once a minute,
cron will only be able to issue the command once every two minutes. If you do not like this feature, you
can run your commands in the background with an
&.
</P>
<A NAME="PAGENUM-85"><P>Page 85</P></A>
<P>
The crontab format is roughly similar to that used by
vixiecron, but without complex features. Individual fields may
contain a time, a time range, a time range with a skip factor, a symbolic range for the day of week and month in year, and
additional subranges delimited with commas. Blank lines in the
crontab or lines that begin with a hash (#) are ignored. If you
specify both a day in the month and a day of week, the result is effectively
ORd; the crontab entry will be run on the specified day
of week and on the specified day in the month.
</P>
<!-- CODE //-->
<PRE>
# MIN HOUR DAY MONTH DAYOFWEEK COMMAND
# at 6:10 a.m. every day
10 6 ***date
# every two hours at the top of the hour
0 */2 ***date
# every two hours from 11p.m. to 7a.m., and at 8a.m.
0 23-7/2,8 ***date
# at 11:00 a.m. on the 4th and on every mon, tue, wed
0 11 4 * mon-wed date
# 4:00 a.m. on january 1st
0 4 1 jan *date
# once an hour, all output appended to log file
0 4 1 jan *date>>/var/log/messages 2>&1
</PRE>
<!-- END CODE //-->
<P>The command portion of the line is run with /bin/sh _c
<command>, and may therefore contain any valid Bourne
shell command. A common practice is to run your command with
exec to keep the process table uncluttered. It is also common
to redirect output to a log file. If you do not, and the command generates output on
stdout or stderr, the result will be mailed to the user in question. If you use this mechanism for special users, such as UUCP, you may want to create an alias for
the user to direct the mail to someone else, such as root or postmaster.
</P>
<P>Internally, this cron uses a quick indexing system to reduce CPU overhead when looking for commands to execute.
Several hundred crontabs with several thousand entries can be handled without using noticeable CPU resources.
</P>
<P><B>
BUGS
</B></P>
<P>Ought to be able to have several crontab files for any given user, as an organizational tool.
</P>
<P><B>
AUTHOR
</B></P>
<P>Matthew Dillon (dillon@apollo.west.oic.com)
</P>
<P>1 May 1994
</P>
<H3><A NAME="ch01_ 45">
csplit
</A></H3>
<P>csplit—Split a file into sections determined by context lines
</P>
<P><B>
SYNOPSIS
</B></P>
<!-- CODE //-->
<PRE>
csplit [_sqkz] [_f prefix] [_b suffix] [_n digits] [—prefix=prefix]
[—suffix_format=suffix] [—digits=digits] [—quiet] [—silent]
[—keep-files] [—elide_empty_files] [—help] [—version]
file pattern...
</PRE>
<!-- END CODE //-->
<P><B>
DESCRIPTION
</B></P>
<P>This manual page documents the GNU version of
csplit. csplit creates zero or more output files containing sections of
the given input file, or the standard input if the name
_ is given. By default, csplit prints the number of bytes written to
each output file after it has been created.
</P>
<P><CENTER>
<a href="0083-0083.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0086-0086.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -