如何清理Linux系统日志
Admin 2023-01-29 群英技术资讯 1310 次浏览
在这篇文章中我们来了解一下“如何清理Linux系统日志”,一些朋友可能会遇到这方面的问题,对此在下文小编向大家来讲解,内容详细,易于理解,希望大家阅读完这篇能有收获哦,有需要的朋友就往下看吧!
代码如下:
#!/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
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:mmqy2019@163.com进行举报,并提供相关证据,查实之后,将立刻删除涉嫌侵权内容。
猜你喜欢
在现在这个大环境下,保障基于Linux的系统的安全是十分重要的。但是,你得知道怎么干。一个简单反恶意程序软件是远远不够的,你需要采取其
1 临时修改主机名显示主机名:oracle@localhost:~$hostnamelocalhost修改主机名:oracle@localhost:~$sudohostnamepythontab comoracle@loc
linux运行c程序命令的方法:首先打开kali linux的终端,用vim工具打开文件并编写代码;然后输入【gcc test.cgcc】进行编译;最后再运行【test.out】在终端中输入【./test.out】。
在登录Linux时要执行文件的过程如下:在刚登录Linux时,首先启动 etc profile 文件,然后再启动用户目录下的 ~ bash_profile、 ~ ba
linux下php的安装目录一般在/etc/下。如果php是以源码方式安装的,那么php的安装目录在/usr/local/lib下,此时,php的配置文件在/usr/local/lib/php.ini。
成为群英会员,开启智能安全云计算之旅
立即注册关注或联系群英网络
7x24小时售前:400-678-4567
7x24小时售后:0668-2555666
24小时QQ客服
群英微信公众号
CNNIC域名投诉举报处理平台
服务电话:010-58813000
服务邮箱:service@cnnic.cn
投诉与建议:0668-2555555
Copyright © QY Network Company Ltd. All Rights Reserved. 2003-2020 群英 版权所有
增值电信经营许可证 : B1.B2-20140078 ICP核准(ICP备案)粤ICP备09006778号 域名注册商资质 粤 D3.1-20240008