[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding shallowest instance of $foo in a given structure

From: RB
Subject: Re: Finding shallowest instance of $foo in a given structure
Date: Wed, 19 Mar 2008 22:59:41 -0600

>  Would the two of you be able to be able to pull this into a
>  (what-I-wanted-to-achieve, command, explanation-of-how-it-works) form
>  so that we can put it into the Texinfo documenation?   (And, length
>  permitting, the manual page).

Since I was already familiar with manual page syntax and aspire to
terseness, here's a preliminary stab at what *might* work for that.
Please criticize or modify as needed; I'm not attached to much of my

I'm assuming the Texinfo page would need to be a little more
explanatory and should stylistically fit with section 8 or 9; is that
the case?

Following is a patch against find.1 from findutils-4.3.13:

--- find.1.orig 2008-03-19 22:22:50.240612504 -0600
+++ find.1      2008-03-19 22:56:23.749388656 -0600
@@ -1903,6 +1903,22 @@
 this is the default anyway, but the parentheses help to show
 what is going on.

+.B find repo/ \e( \-exec [ \-d {}/.svn ] \e\; \-o \-exec [ \-d
{}/.git ] \e\; \e) \-print \-prune
+Search for the roots of specific SCM repositories in an efficient
+manner.  As opposed to the prior example, the parentheses play
+a critical role in combination with
+.B \-prune
+to prevent descent into directories that have already been
+discovered.  A more general way to express this behavior is
+"Find the shallowest instances of repeated leaf nodes in a
+given tree."  This example was derived from a need to maintain
+source synchronization with multiple projects that used
+varying SCM tools and tree management ideologies.
 .B find

reply via email to

[Prev in Thread] Current Thread [Next in Thread]