OPTIONS
-u It specifies the name of the user whose crontab is to be tweaked. If this option is not given, crontab examines "your" crontab, i.e., the crontab of the person executing the command. Note that su(8) can confuse crontab and that if you are running inside of su(8) you should always use the -u option for safety¡¯s sake. The first form of this command is used to install a new crontab from some named file or standard input if the pseudo-filename "-" is given.
-l The current crontab will be displayed on standard output.
-r The current crontab will be be removed.
-e This option is used to edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit from the edi-tor, the modified crontab will be installed automatically.
-i This option modifies the -r option to prompt the user for a ¡¯y/Y¡¯ response before actually removing the crontab.
-s It will append the current SELinux security context string as an MLS_LEVEL setting to the crontab file before editing / replacement occurs - see the documentation of MLS_LEVEL in crontab(5).
复制代码 代码如下:
SEE ALSO
crontab(5), cron(8)
FILES
/etc/cron.allow
/etc/cron.deny
STANDARDS
The crontab command conforms to IEEE Std1003.2-1992 (¡®¡®POSIX¡¯¡¯). This new command syntax differs from previous versions of Vixie Cron, as well as from the classic
SVR3 syntax.
DIAGNOSTICS
A fairly informative usage message appears if you run it with a bad command line.
AUTHOR
Paul Vixie <vixie@isc.org>
4th Berkeley Distribution16 Januar 2007 CRONTAB(1)
ls 2>1 : 不会报没有2文件的错误,但会输出一个空的文件1;
ls xxx 2>1: 没有xxx这个文件的错误输出到了1中;
ls xxx 2>&1: 不会生成1这个文件了,不过错误跑到标准输出了;
ls xxx >out.txt 2>&1 == ls xxx 1>out.txt 2>&1; 因为重定向符号>默认是1,这句就把错误输出和标准输出都传到out.txt 文件中。