| Jean-David Beyer 2005-09-10, 2:45 am |
| zpyoung wrote:
> With in the /var/log directory how does the log files get removed? Does
> some kind of cron script remove them.
>
logrotate rotates them, and the oldest ones fall off the edge of the earth.
E.g.,
/var/log/messages.4 falls of the edge of the earth
/var/log/messages.3 becomes /var/log/messages.4
/var/log/messages.2 becomes /var/log/messages.3
/var/log/messages.1 becomes /var/log/messages.2
/var/log/messages becomes /var/log/messages.1
then a new /var/log/messages is created.
There is nothing magic about the "4", but that is how it is usually set in
Red Hat distributions.
A cron script does run them. Look in /etc/cron.daily for _logrotate_
and do
man logrotate
--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 23:30:00 up 86 days, 17:26, 3 users, load average: 4.12, 4.22, 4.32
|