Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: 0
Script for Logfile

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, 09:09 PM   #2
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: 335Reputation: 335Reputation: 335Reputation: 335
why not just use logrotate with the '--force' option, cron'ed to execute hourly?


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 12:47 PM
Writing shell script with mail < logfile humbletech99 Programming 2 11-22-2005 08:20 AM
Metalog Rotation Crashed_Again Linux - Software 0 02-09-2005 02:31 PM
wallpaper rotation RedRaven Fedora 2 01-05-2005 09: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 05:01 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:33 PM.

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