sudo su -

cd /var/log

rm -f *.gz

cat >mysqld.log (Use Ctrl+C to break out from this command)

cat >php_errors.log (Use Ctrl+C to break out from this command)

cat >shorewall.log (Use Ctrl+C to break out from this command)

cd /var/log/tomcat6

rm -f *.gz

cd /var/log/httpd

rm -f *.gz

cd /var/log/cacti

cat >cacti.log (Use Ctrl+C to break out from this command)

cd /var/spool/mail

cat >root (Use Ctrl+C to break out from this command)

-------------------------------------------------------------------------------------

sudo su -

mysql-as-root

show binary logs; - Make a note of the name of the last row e.g. master-bin.004042

purge binary logs to 'master-bin.004042';


  • No labels