Remove old error log files

Tag: unix Author: cmybx Date: 2009-09-27

error_log files in /var/log/httpd/ are consuming a lot of disk space.

There are error_log.1, error_log.2 files as well. I will like to delete the old files automatically and keep only the current one.

Remember that exists for such questions.

Best Answer

You might want to investigate logrotate.


In this case, it seems as though the logs are already being rotated -- they should investigate what their current log rotation strategy is, and modify it.