centos 用久了,會產生很多evenlog
會佔用硬碟空間,這個語法可以秒歸零evenlog
ps 如果evenlog重要,記得先放到syslog機器上阿
千萬不要直接刪除logfile
rm -f /var/log/messages
正規作法檔案
cat /dev/null > logfile
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
網路上有sh 語法,可以參考。
文章標籤
全站熱搜
