From owner-freebsd-questions Thu Oct 22 17:33:41 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA28862 for freebsd-questions-outgoing; Thu, 22 Oct 1998 17:33:41 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from rio.pii.com (rio.pii.com [192.77.209.200]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA28857 for ; Thu, 22 Oct 1998 17:33:40 -0700 (PDT) (envelope-from robertc@rio.pii.com) Received: from localhost (robertc@localhost) by rio.pii.com (8.8.5/8.8.5) with SMTP id SAA25373; Thu, 22 Oct 1998 18:02:26 -0700 (PDT) Date: Thu, 22 Oct 1998 18:02:26 -0700 (PDT) From: Robert Clark To: "Jason C. Wells" cc: FreeBSD-questions Subject: Re: Getting 'find' to stop finding In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG How about 'locate' ? [RC] On Mon, 19 Oct 1998, Jason C. Wells wrote: > I am writing a little shell script. I would like 'find' to stop searching > after it finds it's first match. I don't see any incantation in 'man find' > that can do this. > > Specifically, I am iterating on this command several-teen times and it is > taking WAAAY too long. :) > > find /usr/ports -name SomeInstalledPort -type d > cp -R /usr/ports/SomeInstalledPort SomeVeryCoolDir > > What can I use to do the same function as 'find' that will stop searching > after a match? > > Catchya Later, | UW Mechanical Engineering > Jason Wells | http://weber.u.washington.edu/~jcwells/ > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message