UnixServerAdmin

Server Administration & Management

How to empty cPanel Server logs in one stroke

You can empty cPanel servers logs by using following commands, Login into server as root

# vi logs
————————————————————
echo > /usr/local/apache/logs/error_log
echo > /usr/local/apache/logs/access_log
echo > /usr/local/apache/logs/access_log
echo > /usr/local/apache/logs/error_log
echo > /usr/local/cpanel/logs/access_log
echo > /usr/local/cpanel/logs/error_log
echo > /var/log/exim_mainlog
echo > /var/log/exim_rejectlog
echo > /var/log/maillog
echo > /var/log/messages
echo > /var/log/messages.1
echo > /var/log/maillog.1
————————————————————

:wq!

# chmod 755 logs

# ./logs

It will empty all logs present on your server.

Advertisements

July 31, 2011 Posted by | cPanel | , , | Leave a comment