Solved

Linux logrotate

Posted on 2007-03-27
4
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

732 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