Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 04-04-2008, 03:43 PM   #1
LQ Newbie
Registered: Apr 2008
Posts: 4

Rep: Reputation: 0
Can logrotate set limits on archived file size?

This is my problem: logrotate works great at limiting how often I want to rotate my logs based on size and/or date. And it lets me limit how many old copies of logs I want to keep.

My problem is that the total size of my archived logs occasionally gets too large. I can set a limit on how many old copies I want, but not how large to allow them to grow. And yes, I compress them.

Is there a way to limit their size within logrotate?

Old 04-05-2008, 08:22 PM   #2
Registered: Feb 2008
Location: Sacramento
Distribution: RHEL AS, mostly
Posts: 44

Rep: Reputation: 18
It does feel like something that logrotate should be able to do with a single directive, but I know of no other way than to write a script to prune however you like, then call it from a "prerotate" or "postrotate" section.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bzip2 and File Size Limits floog Linux - Software 3 02-27-2007 10:14 AM
is this the correct/best way to set file size? George2 Programming 8 07-18-2006 11:19 PM
Quotas and File Size Limits wenberg Slackware 1 12-02-2004 04:40 AM
HD size limits under slackware horndude Slackware 6 02-10-2004 07:34 PM
File Size limits ascii2k Linux - General 4 04-15-2002 10:25 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration