LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-13-2016, 01:23 PM   #1
rootuser
LQ Newbie
 
Registered: Jan 2016
Posts: 4

Rep: Reputation: Disabled
delete catalina.*.log older than 30 days using logrotate


I am looking for ways to use logrotate to delete "catalina.*.log" which is older than 30 days.
By default catalina.log is rotating daily. I would like to know the procedure to delete these files older than 30days using logrotate and not using a script.
 
Old 01-13-2016, 01:58 PM   #2
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 7,671
Blog Entries: 10

Rep: Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077
Welcome to LQ!
http://www.linuxquestions.org/questi...1/#post5130825
gives the "maxage" option of logtwatch.
Code:
man logwatch
documents it.


Please let us know if you have any additional questions.

Last edited by Habitual; 01-13-2016 at 02:03 PM.
 
Old 01-13-2016, 02:08 PM   #3
rootuser
LQ Newbie
 
Registered: Jan 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
I looked at the thread and i am facing the same situation. Using maxage deletes all the files.
 
Old 01-17-2016, 04:45 AM   #4
thras0
LQ Newbie
 
Registered: Jul 2012
Location: Romania
Distribution: CentOS , Redhat , Ubuntu , Linux Mint
Posts: 6

Rep: Reputation: Disabled
Hello,

This is very strange. According to the man pages :

Code:
maxage count
              Remove rotated logs older than <count> days. The age is only checked if  the  logfile
              is to be rotated. The files are mailed to the configured address if maillast and mail
              are configured.
Should solve your log problem.

Ar you running any other log related software on your system ?

Regards.

## - update

Have you tried :
Code:
        daily
        rotate 30
in your logrotate file ?

Last edited by thras0; 01-25-2016 at 03:28 AM. Reason: appended new info
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Tomcat catalina.out renamed to catalina.yyyy-mm-dd.log adebayoo Linux - Server 5 10-16-2012 05:26 AM
auto delete older den 45 days zodehala Linux - Newbie 4 02-04-2012 11:16 AM
delete files when it's older 30 days Madison00 Linux - Newbie 8 01-07-2011 03:07 AM
[SOLVED] Delete old files older than 7 days rjo98 Linux - Newbie 3 09-18-2009 02:15 PM
Delete files older then 30 days stefaandk *BSD 1 01-07-2008 09:31 PM


All times are GMT -5. The time now is 10:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration