[Tfug] Cron job in Ubuntu - something is wrong :( - halp?

Andrew Ayre andy at britishideas.com
Thu Feb 5 17:06:11 MST 2009


You have three quote marks for your echo command. They should be in pairs.

Andy

Jim March wrote:
> OK, so I have a friend's system set up purely as a video camera
> monitor running Zonealarm with six cameras.  Works great - it's
> running Ubuntu Hardy.
> 
> Since Zonealarm takes a bazillion little still images and the number
> of picture files can get crazy, images are saved on a dedicated 500gig
> drive formatted with ReiserFS.
> 
> Great.  But I can't have the disk fill up, so I have a cron job set to
> do a purge of files older than 90 days.  It's not working.
> 
> Sigh.
> 
> Here's the contents of the root crontab entries...the username on this
> system is "camera":
> 
> ---
> PATH=/usr/sbin:/usr/bin:/sbin:/bin
> 01 04 * * * find /media/disk/* -mtime +90 -exec rm {} \;
> 01 04 * * * echo "Purge of camera files older than 90 days
> successful:" $(date)" >> /home/camera/Desktop/purge.log
> ---
> 
> The command:
> 
> sudo  find /media/disk/* -mtime +90 -exec rm {} \;
> 
> ...works just fine.  No purge.log file is being created.  I put this
> in the root crontab via:
> 
> sudo crontab -e
> 
> So...what the heck?
> 
> [wimper]
> 
> Jim
> 
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
> 
> 
> 

-- 
Andy
PGP Key ID: 0xDC1B5864




More information about the tfug mailing list