Date: Thu, 13 May 2004 15:40:23 -0700 (PDT) From: Oliver Eikemeier <eikemeier@fillmore-labs.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/66613: find(1): -mindepth and -maxdepth doesn't work as expected Message-ID: <200405132240.i4DMeNKs001679@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/66613; it has been noted by GNATS. From: Oliver Eikemeier <eikemeier@fillmore-labs.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405132240.i4DMeNKs001679>