LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-18-2006, 09:52 PM   #1
Kjell Persson
LQ Newbie
 
Registered: Feb 2006
Posts: 7

Rep: Reputation: 0
Script for Logfile Rotation....help


I am tryin to figure out a script that is called from cron once every hour to rotate a log file, I need it to keep 4 archives and the original.

There is not much info on the man cron or info cron

I would sincerely appreciate any help.
 
Old 03-18-2006, 10:09 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
why not just use logrotate with the '--force' option, cron'ed to execute hourly?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell scripting: Print output to logfile, error to logfile & screen stefanlasiewski Programming 18 05-22-2008 01:47 PM
Writing shell script with mail < logfile humbletech99 Programming 2 11-22-2005 09:20 AM
Metalog Rotation Crashed_Again Linux - Software 0 02-09-2005 03:31 PM
wallpaper rotation RedRaven Fedora 2 01-05-2005 10:20 AM
Can I redirect script output to a file without ">> $LOGFILE" at the end of each line davee Linux - General 1 12-19-2003 06:01 AM


All times are GMT -5. The time now is 09:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration