Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2000 13:17:36 -0500
From:      "Shawn Barnhart" <swb@grasslake.net>
To:        "Ben Smithurst" <ben@scientia.demon.co.uk>
Cc:        <questions@FreeBSD.ORG>
Subject:   Re: 'find' command -- maxdepth option?
Message-ID:  <054301bfb13e$07f775d0$b8209fc0@marlowe>
References:  <04f101bfb116$e4baafa0$b8209fc0@marlowe> <20000428155325.A86507@strontium.scientia.demon.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help

----- Original Message -----
From: "Ben Smithurst" <ben@scientia.demon.co.uk>
To: "Shawn Barnhart" <swb@grasslake.net>

| 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?054301bfb13e$07f775d0$b8209fc0>