LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-28-2012, 05:50 AM   #1
Frustin
Member
 
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512

Rep: Reputation: 30
Question log files house keeping


i've got an app running on this server and it's log files are getting too heavy. i dont want to delete them all, but i'd like to do something like the system does with /var/log/syslog

e.g.
1. allow the <file>.log to grow to a certain size
2. then copy it to another file like: <file>.log.1
3. Empty the original log
4. Keep creating up to .log.3
5. deleting all other logs after that point
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-28-2012, 06:07 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
logrotate can be configured to do that. Have a look in /etc/logrotate.d for samples
 
2 members found this post helpful.
  


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
How to delete files keeping the files listed in a text file -urgent jeesun Linux - General 4 10-21-2011 11:28 AM
Post Install House Keeping Woodsman Slackware 6 05-27-2008 09:14 AM
Keeping a System Update Log syntac Linux - General 5 11-10-2006 08:45 PM
LXer: China president at Gates house, not White House LXer Syndicated Linux News 0 04-16-2006 09:33 PM
logrotate log files - keeping in order when using grep or cat and bash dmellem Linux - Software 6 02-11-2005 01:05 PM

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

All times are GMT -5. The time now is 07:10 PM.

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