/var/cache/logwatch目录几十G,把根分区占满了。收到Anacron job 'cron.daily' on localhost标题邮件。现在我要关闭logwatch这个功能,让他不要产生。
1、把MailTo中的root设置为空,由于logwatch产生邮件就不会发送了。
[root@mail logwatch]# vi /usr/share/logwatch/default.conf/logwatch.conf
2、删除相关定时任务。
[root@mail logwatch]# rm -f /etc/cron.daily/0logwatch
3、每敲一下回车,就出来You have new mail in /var/spool/mail/root的提示,不检测邮箱。
[root@mail logwatch]# echo "unset MAILCHECK" >> /etc/profile [root@mail logwatch]# source /etc/profile
4、重启定时任务。
[root@mail logwatch]# /etc/init.d/crond restart 停止 crond: [确定] 正在启动 crond: [确定]
转载于:https://blog.51cto.com/net881004/2164665