Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Log files in /var/log/apache2/ are too big. I want to limit the file size. Is it possible to store only the recent 100 lines?

Thanks.

share|improve this question

migrated from stackoverflow.com Feb 20 '11 at 13:30

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 6 down vote accepted

Take a look here:

http://httpd.apache.org/docs/2.0/programs/rotatelogs.html

You can save a logfile per day and delete old ones automatically with a cronjob. The lines can be done with a limitation of the file size (I think it is not necessary of it will be 120 or 100 lines?).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.