日期:2014-05-16  浏览次数:20801 次

at 和crontab命令如何使用
刚刚接触linux,学习使用at和crontab.
at:

#at 10:50 today
at>touch /home/test/testat
但是在今天的/home/test/下并没有建立testat文件。

crontab:

#crontab
55 10 25 11 0 touch /home/test/testcrontab
同样也没有建立testcrontab文件。
刚学习linux,恳请指教

------解决方案--------------------
55 10 25 11 * touch /home/test/testcrontab
不涉及的列要填写星号


at的参考
echo "touch /home/test/testat" | at 1055 Nov 25
------解决方案--------------------
[root@RHEL6A tmp]# ls
test
[root@RHEL6A tmp]# date
2011年 11月 25日 星期五 12:56:21 CST
[root@RHEL6A tmp]# at 12:58 today
at> touch test1.txt
at> <EOT>
job 3 at 2011-11-25 12:58
[root@RHEL6A tmp]# ls
test
[root@RHEL6A tmp]# date
2011年 11月 25日 星期五 12:56:43 CST
[root@RHEL6A tmp]# ls
test test1.txt
[root@RHEL6A tmp]# date
2011年 11月 25日 星期五 12:58:24 CST
[root@RHEL6A tmp]# 

上面的<EOT>表示按了ctrl+d来结束输入