LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 11-18-2009, 04:12 AM   #1
shettigarac
LQ Newbie
 
Registered: Nov 2009
Posts: 1

Rep: Reputation: 0
How to implement Logrotate mechansim based on Size?


Hi,

I have a situation like below.

I should implement a log rotate mechanism for 2 files in a particular directory. But this based on size.

If file crosses 2MB size, then i should tar it and store it based on timestamp.


Could you please provide me some suggestion for the same?

Thanks very much!!!
 
Old 11-18-2009, 06:33 AM   #2
harry_uk
Member
 
Registered: Mar 2009
Posts: 36

Rep: Reputation: 16
Logrotate has a compress and size option.. Refer its man pages and post here if you still face trouble

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

Last edited by harry_uk; 11-18-2009 at 06:33 AM. Reason: link added
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
does logrotate set size to 1048576 bytes by default if no size is specified? finebanana Red Hat 0 01-23-2009 09:44 AM
Can logrotate set limits on archived file size? 0xdefec8 Linux - Server 1 04-05-2008 09:22 PM
logrotate ignoring 'size' spec ... why? OpenMacNews Linux - Software 4 10-16-2006 08:50 PM
LXer: Implement MySQL-based transactions with a new set of PHP ... LXer Syndicated Linux News 0 06-21-2006 11:33 PM
Logrotate based on time AND size shishya Linux - Software 1 04-11-2006 08:30 PM


All times are GMT -5. The time now is 01:35 PM.

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