Red Hat Topics - Log Files

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Topics > September 2005 > Log Files





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Log Files
zpyoung

2005-09-09, 8:46 pm

With in the /var/log directory how does the log files get removed? Does
some kind of cron script remove them.

Thanks

zpyoung


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
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com