Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Linux logrotate

Posted on 2007-03-27
4
Medium Priority
?
191 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 35

Accepted Solution

by:
Duncan Roe earned 1000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

610 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