?
Solved

Linux logrotate

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

Understanding Linux Permissions

Linux for beginners: How to view the permissions associated with files and directories and also how you can change them.

Question has a verified solution.

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

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 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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

764 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