From owner-freebsd-bugs@FreeBSD.ORG Thu May 13 15:40:31 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFFC716A4D3 for ; Thu, 13 May 2004 15:40:31 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA62743D77 for ; Thu, 13 May 2004 15:40:27 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i4DMeNcw001681 for ; Thu, 13 May 2004 15:40:23 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i4DMeNKs001679; Thu, 13 May 2004 15:40:23 -0700 (PDT) (envelope-from gnats) Date: Thu, 13 May 2004 15:40:23 -0700 (PDT) Message-Id: <200405132240.i4DMeNKs001679@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Oliver Eikemeier Subject: Re: bin/66613: find(1): -mindepth and -maxdepth doesn't work as expected X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Oliver Eikemeier List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2004 22:40:34 -0000 The following reply was made to PR bin/66613; it has been noted by GNATS. From: Oliver Eikemeier To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: Re: bin/66613: find(1): -mindepth and -maxdepth doesn't work as expected Date: Fri, 14 May 2004 00:34:52 +0200 Ok, here is the patch, applies to -CURRENT and -STABLE: Index: find.1 =================================================================== RCS file: /home/ncvs/src/usr.bin/find/find.1,v retrieving revision 1.59 diff -u -r1.59 find.1 --- find.1 21 Apr 2004 00:42:55 -0000 1.59 +++ find.1 13 May 2004 22:22:29 -0000 @@ -427,11 +427,23 @@ .Nm ls Fl dgils . .Ek .It Ic -maxdepth Ar n -True if the depth of the current file into the tree is less than or equal to +Always true; do not apply any tests or actions at levels less than .Ar n . +If any +.Ic -maxdepth +primary is specified, it applies to the entire expression even if it would +not normally be evaluated. +.Ic -maxdepth Ar 0 +limits the whole search to the command line arguments. .It Ic -mindepth Ar n -True if the depth of the current file into the tree is greater than or equal to -.Ar n . +Always true; descend at most +.Ar n +directory levels below the command line arguments. If any +.Ic -mindepth +primary is specified, it applies to the entire expression even if it would +not normally be evaluated. +.Ic -mindepth Ar 1 +processes all but the command line arguments. .It Ic -mmin Ar n True if the difference between the file last modification time and the time .Nm I'm not sure if `Ic' is the right tag, it is in line with the rest of the man page. Be aware that -mindepth and -maxdepth are not included in the posix standard, they are GNU extensions to find(1). The semantics are compatible with GNU find, though. -Oliver