LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 03-12-2007, 02:29 AM   #1
sudevank
LQ Newbie
 
Registered: Mar 2007
Posts: 27

Rep: Reputation: 15
How tol limit the file to fixed size?


Hi,
I want to limit the file size to 100MB(say0. but i should able to add details (log messages). I dont want the old details in the file ie need only recent updates.( a mechanism which work as a FIFO or pipe )
 
Old 03-12-2007, 03:10 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Have a look at the "logrotate" command.
 
Old 03-12-2007, 03:43 AM   #3
sudevank
LQ Newbie
 
Registered: Mar 2007
Posts: 27

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jlliagre
Have a look at the "logrotate" command.
let me try that.
I have lot of log files dynamicly created with differnt file names.
is there any utility that can implement easly in this contest?
 
Old 03-12-2007, 05:29 AM   #4
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
logrotate allows you to specify log names with wildcards (ie to rotate all logs in a certain directory).
See "man logrotate", especially also "olddir" option.
 
Old 03-13-2007, 04:33 AM   #5
sudevank
LQ Newbie
 
Registered: Mar 2007
Posts: 27

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by timmeke
logrotate allows you to specify log names with wildcards (ie to rotate all logs in a certain directory).
See "man logrotate", especially also "olddir" option.
Ihi i dont want to depends on another program.Is there any methord which give full control for me i want a mechanism where i can write my log to a file if it reached the maxsize the older entries automatically remove(from same file no need to back up and all).
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
jpg file lowercase with fixed size Whynot Linux - Software 5 12-13-2006 12:36 AM
File Size limit? compu73rg33k Linux - Software 1 02-27-2005 10:11 PM
limit file size ust Linux - General 2 02-24-2005 07:33 AM
File Size Limit?? Manuel-H Linux - Software 1 04-16-2004 03:23 AM
file size limit jaysan Slackware 5 07-12-2002 03:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:29 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration