View Single Post
  #7   (View Single Post)  
Old 3rd June 2008
plexter plexter is offline
Shell Scout
 
Join Date: May 2008
Posts: 124
Default

Hello all,

Thank you very much for your replies.

scottro:

I am having trouble getting your command to work.

I tried inputting into CRON


30 * * * * cd /usr/path && /usr/bin/find ./-type f -mtime +7 -exec rm -f '{}'+
and
30 * * * * cd /usr/path /usr/bin/find ./-type f -mtime +7 -exec rm -f '{}'+

and nothing seems to happen.

I have also tried simply typing the command on the command line and I get dropped into a > prompt where I do not seem to be able to do anything. Or it says "find: -exec: no terminating ";" "

I tried adding a ; but that didnt seem to help.


I am not sure if I am doing something wrong, if cron is not running for root??? or what could be up.

Oh and I setup cron by: crontab -u root -e

Help would be greatly appreciated.
Reply With Quote