Solved

Linux logrotate

Posted on 2007-03-27
4
170 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help Linux centos 5.7 3 94
Linux 10 111
server would not shutdown and lots of lsmod procs.... any idea what this is? 5 103
python - find anything after $ question. 9 18
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 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