apache rotatelogs

apache
Every day ,it will create a new log file
CustomLog “|/usr/local/httpd/bin/rotatelogs /var/logs/access.log%Y%m%d 86400 480″ common
edit crontab,try to purge one weeks ago log.
find /var/log -type f ! -mtime -7 -name “access.log*” -exec rm -rf

This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>