LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 12: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, 12:58 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
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 01:03 PM.
 
Old 01-13-2016, 01: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, 03: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 02:28 AM. Reason: appended new info
 
  


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 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 04:26 AM
auto delete older den 45 days zodehala Linux - Newbie 4 02-04-2012 10:16 AM
delete files when it's older 30 days Madison00 Linux - Newbie 8 01-07-2011 02:07 AM
[SOLVED] Delete old files older than 7 days anon091 Linux - Newbie 3 09-18-2009 01:15 PM
Delete files older then 30 days stefaandk *BSD 1 01-07-2008 08:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:50 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