Somebody scribbled about Re: [expert] Clean up old logs

>
>didn't show any results. And what does logrotate actually do (how does
> it work)?

It's not probably going to be running. Do you have a /etc/logrotate.d or 
an /etc/logrotate.conf file? It's not a boot time service but it gets run 
out of cron -- typically 4am on Sundays when the lines are not too 
busy ;).

What it basically does is let you keep a certain number of week's worth of 
log files. For instance if you have 5 weeks of logs for "foo", you'd 
typically see (after 5 weeks, of course):

/var/log/foo
/var/log/foo.1.gz
/var/log/foo.2.gz
/var/log/foo.3.gz
/var/log/foo.4.gz
/var/log/foo.5.gz

Now, pretend it's the sixth week. First it will get rid 
of /var/log/foo.5.gz, then move 4 to 5, 3 to 4, 2 to 3, 1 to 2, 
gzip /var/log/foo, and touch a zero byte /var/log/foo so you can start 
over. Neat huh?

In your situation, you may not have a standard log file but if it's one 
that periodically grows, you can add it to the existing logrotate 
configuration. Some are not set by default or have longer than weekly 
rotate times (likely httpd for one I believe).


-- 
------------------------------------------------------------------------
David E. Fox                              Thanks for letting me
[EMAIL PROTECTED]                            change magnetic patterns
[EMAIL PROTECTED]               on your hard disk.
-----------------------------------------------------------------------


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to