I am trying to monitor a log file which rotates frequently by logrotate. but i am unable to get that correctly. can any one explain how actually logrotate works?
Is a file renamed and a new file is created ?
or is a file copied with a new name and the current file is emptied?
Before rotation:
131887 -rw-r--r-- 1 root root 11385 Sep 25 03:40 /var/log/sas.log
After rotation:
131887 -rw-r--r-- 1 root root 0 Sep 25 04:40 /var/log/sas.log
131911 -rw-r--r-- 1 root root 11385 Sep 25 04:40 /var/log/sas.log.1