Last Updated: November 17, 2016
·
325
· benjamin658

Clean Ubuntu log safely script

!/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/sslerrorlog

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

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