Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-13-2016, 01:23 PM   #1
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
LQ 5k Club
Registered: Jan 2011
Location: Nowhere near you, thank God.
Distribution: OSX Sierra
Posts: 8,573
Blog Entries: 15

Rep: Reputation: Disabled
Welcome to LQ!
gives the "maxage" option of logtwatch.
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
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
LQ Newbie
Registered: Jul 2012
Location: Romania
Distribution: CentOS , Redhat , Ubuntu , Linux Mint
Posts: 6

Rep: Reputation: Disabled

This is very strange. According to the man pages :

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 ?


## - update

Have you tried :
        rotate 30
in your logrotate file ?

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


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 > Forums > Linux Forums > Linux - Newbie

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