From owner-freebsd-questions Fri Apr 28 11:17:27 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mercury.campbell-mithun.com (Mercury.campbell-mithun.com [192.159.32.151]) by hub.freebsd.org (Postfix) with ESMTP id 8A99437BA10 for ; Fri, 28 Apr 2000 11:17:23 -0700 (PDT) (envelope-from swb@grasslake.net) Received: from marlowe (Marlowe.campbell-mithun.com [192.159.32.184]) by mercury.campbell-mithun.com (8.9.1a/8.9.1) with SMTP id NAA30891; Fri, 28 Apr 2000 13:17:20 -0500 Message-ID: <054301bfb13e$07f775d0$b8209fc0@marlowe> From: "Shawn Barnhart" To: "Ben Smithurst" Cc: References: <04f101bfb116$e4baafa0$b8209fc0@marlowe> <20000428155325.A86507@strontium.scientia.demon.co.uk> Subject: Re: 'find' command -- maxdepth option? Date: Fri, 28 Apr 2000 13:17:36 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ----- Original Message ----- From: "Ben Smithurst" To: "Shawn Barnhart" | Look at -prune. If you only want to find files in the current directory, | try something like, | | find . \( ! -name . -type d -prune \) -or \( other_contition -print \) | | where "other_condition" should be replaced appropriately. If you want | the directories printed as well, put "-print" after "-prune" or remove | the "-print" from the end, making the default to print any file matching | either condition. | | This probably doesn't work the same as -maxdepth but it might work for | what you want. It seems to work close enough, although it's added complexity. I guess I wish there was a -maxdepth option, or a port for gnu findutils. Gnu find seems superior to freebsd's find. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message