执行at命令的情况:
代码: 全选
zym@zym-freedom:~$ at now+1minute
warning: commands will be executed using /bin/sh
at> ls
at>
at> <EOT>
job 273 at Thu Oct 28 08:30:00 2010
Warning: at daemon not running
接下来看看有没有atd这个进程:
代码: 全选
zym@zym-freedom:~$ ps -aux | grep atd
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
zym 14369 0.0 0.0 3596 744 pts/0 S+ 08:33 0:00 grep --color=auto atd
那就启动atd吧,
代码: 全选
zym@zym-freedom:/etc/init.d$ sudo /etc/init.d/atd start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service atd start
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start atd
代码: 全选
zym@zym-freedom:/etc/init.d$ sudo start atd
start: Job is already running: atd
代码: 全选
zym@zym-freedom:/etc/init.d$ at now + 1minutes
warning: commands will be executed using /bin/sh
at> ls
at> <EOT>
job 274 at Thu Oct 28 08:42:00 2010
Warning: at daemon not running
代码: 全选
zym@zym-freedom:/etc/init.d$ ps -aux | grep 'atd'
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
zym 16209 0.0 0.0 3596 744 pts/0 S+ 08:43 0:00 grep --color=auto atd
zym@zym-freedom:/etc/init.d$ sudo ps -aux | grep 'atd'
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
zym 16241 0.0 0.0 3596 744 pts/0 S+ 08:43 0:00 grep --color=auto atd
代码: 全选
zym@zym-freedom:/etc/init.d$ sudo /etc/init.d/atd status
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service atd status
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the status(8) utility, e.g. status atd
atd start/killed, process 27511
代码: 全选
zym@zym-freedom:/etc/init.d$ status atd
atd start/killed, process 27511
代码: 全选
zym@zym-freedom:/etc/init.d$ kill 27511
bash: kill: (27511) - 没有那个进程