您的位置:首页 > 其它

发现/var/log下没有cron的日志怎么办?

2016-01-21 11:36 1456 查看
1,修改rsyslog文件:

[ruby] view
plain copy

/etc/rsyslog.d/50-default.conf

将 rsyslog 文件中的 #cron.* 前的 # 删掉;

2,重启rsyslog服务:

[ruby] view
plain copy

service rsyslog restart

3,重启cron服务:

[ruby] view
plain copy

service cron restart

4,查看日志文件:

[ruby] view
plain copy

tail -f /var/log/cron.log

其实,Ubuntu中,cron的日志是存在的:

By default the cron log in ubuntu is located at /var/log/syslog. Use the below command to check the cron entries in this file.

grep cron /var/log/syslog

只需执行:

[ruby] view
plain copy

grep cron /var/log/syslog
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: