Solved

Linux logrotate

Posted on 2007-03-27
4
163 Views
Last Modified: 2010-04-22
Hi!

i want to rotate daemon.log every week keeping last year's log... how i can do it?

Thanks in advance
0
Comment
Question by:morsa804tons
4 Comments
 

Author Comment

by:morsa804tons
ID: 18800212
Hi!

i want to rotate daemon.log every week keeping last year's log... how i can do it?

Thanks in advance
0
 
LVL 84

Expert Comment

by:ozo
ID: 18802745
crontab <<end
0 0 * * 0 mv daemon.log ratate.`date +%W`
end
0
 
LVL 48

Expert Comment

by:Tintin
ID: 18803963
Is daemon.log written to via syslog?

If so, add it to /etc/logrotate.d/syslog
0
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 250 total points
ID: 18806690
You can put the script in /etc/cron.weekly. That takes care of running it once a week.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now