Clearing error_logs on User accounts in Cpanel

If you are cpanel/linux server admin and want to free up server’s disk space, removing error_logs is one of the effective measures to take. Many users using php applications have their error_logs pile up after a while and this could start clogging up user disk space and eventually server space.

This simple command in ssh can clear all user error logs in one fell swoop:

find /home -type f -name error_log -exec rm -f {} \;

Depending on drive speed and amount of users, this command could take some time to run the task.

admin

Leave a Reply

Your email address will not be published. Required fields are marked *