Bad cron job?

I think that I followed the manual’s directions when doing
this. I entered a command into root’s crontab. Now I get an email like
the following one every hour:

f -amin +600  -exec rm '{}' ;

find: -exec: no terminating “;”

The crontab for root looks like this:

0 * * * * find /usr/local/rt-2-0-6/WebRT/sessiondata -type f -amin +600 -exec rm ‘{}’ ;

Anyone know where my error is?

							TIA,
							Jaime

“[A]s we enjoy great advantages from the inventions of others, we should
be glad of an opportunity to serve others by any invention of ours; and
this we should do freely and generously.” – Ben Franklin,
http://earlyamerica.com/lives/franklin/chapt10/index.html

Jaime wrote:

find: -exec: no terminating “;”

The crontab for root looks like this:
0 * * * * find /usr/local/rt-2-0-6/WebRT/sessiondata -type f -amin +600 -exec rm ‘{}’ ;

Add a backslash immediately before the semicolon.

I think that I followed the manual’s directions when doing
this. I entered a command into root’s crontab. Now I get an email like
the following one every hour:

Subject: Cron root@zeus find /usr/local/rt-2-0-6/WebRT/sessiondata -type
f -amin +600 -exec rm ‘{}’ ;

find: -exec: no terminating “;”

The ‘;’ needs to be escaped from the shell:

find /usr/local/rt-2-0-6/WebRT/sessiondata -type f -amin +600 -exec rm
{} ;

(first escape character mine, added for cut-n-paste accuracy – one line
will work. Your implementation of ‘find’ may require the single quotes
around ‘{}’ – neither FreeBSD nor Linux find need it.)

Greg White
“I have no special gift, I am only passionately curious.”
- Albert Einstein

Jaime wrote:

    I think that I followed the manual's directions when doing

this. I entered a command into root’s crontab. Now I get an email like
the following one every hour:

Subject: Cron root@zeus find /usr/local/rt-2-0-6/WebRT/sessiondata -type
f -amin +600 -exec rm ‘{}’ ;

find: -exec: no terminating “;”

    The crontab for root looks like this:

0 * * * * find /usr/local/rt-2-0-6/WebRT/sessiondata -type f -amin +600 -exec rm ‘{}’ ;

try to escape the semicolon by prepending a backslash. It is consumed by the shell
interpreter otherwise.

0 * * * * find /usr/local/rt-2-0-6/WebRT/sessiondata -type f -amin +600 -exec rm
‘{}’ ;

Regards,
Harald

Harald Wagener | Systemadministrator
FCB/Wilkens GmbH | Tel.:+49-40-2881-1252
An der Alster 42 | Fax.:+49-40-2881-1263
20099 Hamburg | http://www.fcb-wilkens.com