语法格式
logwatch [参数]
常用参数:
–detail | 指定日志报告的详细程度 |
---|---|
–range | 指定处理日志的日期范围 |
参考实例
只看sshd的日志情况:
[root@linux265 ~]# logwatch --service sshd --detail High
查看sshd当天的日志情况:
[root@linux265 ~]# logwatch --service sshd --detail High --range today
查看sshd昨天的日志情况:
[root@linux265 ~]# logwatch --service sshd --detail High --range yesterday
查看sshd从2018年10月24日到2019年10月24日的日志情况:
[root@linux265 ~]# logwatch --service sshd --detail High --range 'between 10/24/2018 and 10/24/2019'
至此关于Linux常用命令logwatch命令的使用方法分享结束,大家如果对logwatch命令的使用方法还有问题可以通过评论区将问题提交我们。
以上就是
为各位朋友分享的 相关内容。想要了解更多Linux相关知识记得关注公众号“良许Linux”,或扫描下方二维码进行关注,更多 等着你 !