您当前的位置: 首页 > 网络技术  > 服务器教程 浏览
Linux下清除系统日志的方法
发布时间:2015-12-13    点击率:次    来源:www.sytcke.com    作者:电脑技术学习网

   代码如下:

  #!/bin/sh

  cat /dev/null > /var/log/syslog

  cat /dev/null > /var/adm/sylog

  cat /dev/null > /var/log/wtmp

  cat /dev/null > /var/log/maillog

  cat /dev/null > /var/log/messages

  cat /dev/null > /var/log/openwebmail.log

  cat /dev/null > /var/log/maillog

  cat /dev/null > /var/log/secure

  cat /dev/null > /var/log/httpd/error_log

  cat /dev/null > /var/log/httpd/ssl_error_log

  cat /dev/null > /var/log/httpd/ssl_request_log

  cat /dev/null > /var/log/httpd/ssl_access_log

来源 电脑技术网 www.sytcke.com
发表留言
发表留言请先登录!
免责声明:本站发布的信息和评论纯属网民个人行为,并不代表本站立场,如发现有违法信息或侵权行为,请直接与本站管理员联系,我们将在收到您的信息后24小时内作出处理!