发现/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
[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
相关文章推荐
- 关于GridView
- Delphi使用JSON
- HttpClientHandler
- 读取SequenceFile中自定义Writable类型值
- Linux 中使用pkill踢出在线用户的方法
- Endnote安装完成后,word2013工具栏不显示解决方法
- freemarker list 的嵌套问题
- App版本更新时对SQLite数据库升级或者降级遇到的问题
- java List 排序 Collections.sort()
- Android 一:通过adb命令判断手机是否被root过
- git apply failed (转载)
- SQL 数据库的连接查询
- swift 枚举
- make install的时候指定安装路径
- Android PopupWindow 疑难杂症之宽度WRAP_CONTENT
- html5缓存(二)localStorage
- 如何卸载rpm包
- Centos7 关闭防火墙
- android编译系统学习
- C++中类的大小