Re: cron jobs + (some?) output
On Tue, Dec 07, 2004 at 05:12:31PM -0500, Ben Russo wrote:
> 3 4 * * * rm -f /var/log/mplayer.log; mv /var/log/mplayer.log
> /var/log/mplayer.log.yesterday; mplayer -command -options blah blah >
> /var/log/mplayer.log 2>&1
>
> This command will create a new log every day, and keep yesterdays log
> too, but will lose all older logs.
First you remove /var/log/mplayer.log; then you move the now
non-existing /var/log/mplayer.log to mplayer.yesterday... I don't
think that's going to work. :)
I suggest making it "rm -f /var/log/mplayer.yesterday" or skipping
that part completely.
--
Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands]
"Let your advance worrying become advance thinking and planning."
- Winston Churchill
Reply to: