Results 1 to 4 of 4
Thread: Clean logs
Enjoy an ad free experience by logging in. Not a member yet? Register.
So I just found out on one of my servers log rotate is not on...
How did I find out... lol 100% full / & /var.
So here is my question, isn't there a way to clean out entries past a certain amount of days? I'd like to shrink it up and then I will turn log rotate on
I need this asap! Please help if you know how before I just blow the entire log away.
- Join Date
- Feb 2008
- Bangalore, India
You need to create a small script which will find 1 or more days before logs and zip them.
you can also add one more shell check which will delete very old logs.
- Use find -mtime option to find 1 or more days old files.
- Put script in cron and run as per your need.
If you need script let me knowbigunix.blogspot.com
Registered Linux User: #476440
have you checked /etc/logrotate.conf or /etc/logrotate.d/?
logrotate should be able to handle this.