[ale] One-liner needed: log-rolling with a different spin

Mills John M-NPHW64 Jmills at motorola.com
Wed Jul 15 14:41:45 EDT 2009


Brian and James -

Thanks for the help. Either look like good approaches. I'll give it a bit more thought and try one.


-----Original Message-----
From: ale-bounces at ale.org on behalf of Brian Pitts
Sent: Wed 7/15/2009 12:41 PM
To: Atlanta Linux Enthusiasts - Yes! We run Linux!
Subject: Re: [ale] One-liner needed: log-rolling with a different spin
 
Mills John M-NPHW64 wrote:
> ALErs -
> 
> I am accumulating a log file a bit faster than I would like, and only
> need to keep the most recent N lines (say, N = 100000) to examine in
> case of a crash. I want the log traffic to continue undisturbed while
> early lines are truncated.
> 
> I want to script this and run it as a 'cron' job to keep the file size
> manageable. I would prefer not to restart 'syslogd', mainly because it
> seems to me that should not be necessary.
> 
> Suggestions?
> 

Use logrotate.

http://linuxcommand.org/man_pages/logrotate8.html

-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3150 bytes
Desc: not available
Url : http://mail.ale.org/pipermail/ale/attachments/20090715/9b47d062/attachment.bin 


More information about the Ale mailing list