X-Spam-Check-By: sourceware.org Message-ID: <7402902.post@talk.nabble.com> Date: Fri, 17 Nov 2006 07:02:17 -0800 (PST) From: cygwill To: cygwin AT cygwin DOT com Subject: RE: Cron and find In-Reply-To: <8EEBC073498952489924A8EC25FBD29D062A9424@RAM-SRV-09.rubicon-uk.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: will DOT wright AT tiscali DOT co DOT uk References: <454146830002AB83 AT mail-6-uk DOT mail DOT tiscali DOT sys> <4559A462 DOT 5F4F0171 AT dessent DOT net> <45412CD70002C607 AT mail-2-uk DOT mail DOT tiscali DOT sys> <8EEBC073498952489924A8EC25FBD29D062A9424 AT RAM-SRV-09 DOT rubicon-uk DOT com> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 ok - I've worked this out. The find command works if I explicitly use /usr/bin/find no idea why this is an issue when cron runs as the same user I'm logged in as? Will Wright-2 wrote: > > 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/ > > > -- View this message in context: http://www.nabble.com/Cron-and-find-tf2628629.html#a7402902 Sent from the Cygwin Users mailing list archive at Nabble.com. -- 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/