X-Spam-Check-By: sourceware.org X-VirusChecked: Checked X-Env-Sender: wwright AT rubicon-uk DOT com X-Msg-Ref: server-2.tower-66.messagelabs.com!1163522212!18705899!1 X-StarScan-Version: 5.5.10.7; banners=rubicon-uk.com,-,- Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: Cron and find Date: Tue, 14 Nov 2006 16:36:52 -0000 Message-ID: <8EEBC073498952489924A8EC25FBD29D062A9424@RAM-SRV-09.rubicon-uk.com> From: "Will Wright" To: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id kAEGbAVW023533 Thanks for the tips Brian. I have updated my script accordingly but (as you guessed) this has made no difference when run via cron. :( -----Original Message----- From: Brian Dessent [mailto:brian AT dessent DOT net] Sent: 14 November 2006 11:12 To: cygwin AT cygwin DOT com Subject: Re: Cron and find will DOT wright AT tiscali DOT co DOT uk wrote: > 4 10 * * 1-5 find /cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs > -type f -name stdout.log\.* -mtime +2 > /cygdrive/d/Apps_v8p4/Bridge/DataFeed/deploy/bin/testfind.log The need for quoting the argument to -name is to keep the shell from expanding globs (* and ?), so that they can be evalulated instead by find. This can be done either with quotes or backslashes, so I would expect to see -name stdout.log.\* or -name stdout.log\* where the former would match only stdout.log.03Nov2006 and the latter would match both that and stdout.log. However, what you have: -name stdout.log\.* does not make any sense as the "." is not a glob character and does not need to be quoted, leaving the "*" unprotected and vulnerable to shell expansion if there happened to be a matching filename in the current directory (although that typically results in syntax errors from find.) This could explain why it happens to work from the command line but not in cron, but it's kind of a long shot. I don't see any other common cron problems (D is not a network drive and your mounts are system-mode.) In any case I would fix the quoting, regardless of other issues. Brian ================================================= Rubicon Fund Management LLP is Authorised and Regulated by the Financial Services Authority. Telephone: 44(0) 20 7074 4200 Fax: 44(0) 20 7074 4299 Registered in England: Partnership No OC300480 Registered Office: 42-46 High Street, Esher, Surrey KT10 9QY Important Notice: This message is for the named recipient(s) use only. It may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you have received this message by error, please immediately notify the sender, delete it and all copies of it from your system, destroy any hard copies, and notify postmaster AT rubicon-uk DOT com. If you are not the intended recipient, you must not use, disclose, distribute, print, or copy any part of this message directly or indirectly. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/