then i update the file by using l"ogrotate -f /etc/logrotate.d/sauer"
then i test the new log with IO(while true ; do echo "blabla" >> /var/log/sauer ;done)
i dont understand why the log size is getting larger then 1MB (as you can see i configured size=1M)? do you know why the size limit didnt effect.
The limit is only checked after the next invocation of logrotate. So, make it bigger than 1 MB, THEN run logrotate. Also, remove the = sign. This might prevent the script from properly seeing the "size" option.
Well, you can run logrotate with high granularity -- every minute using a cron job. Or, you can pipe the output of your process to [i]rotatelogs[i], a program that comes with apache:
thanks
one last thing
do you know what is the option that related to the first rotation.
mean if there is compress it wont effect the first rotate log(like messages.1).
cheers