[prev in list] [next in list] [prev in thread] [next in thread]
List: opensuse
Subject: Re: [opensuse] OO OS-EN
From: Anton Aylward <opensuse () antonaylward ! com>
Date: 2014-04-27 16:30:06
Message-ID: 535D308E.1040801 () antonaylward ! com
[Download RAW message or body]
On 04/27/2014 11:12 AM, Carlos E. R. wrote:
>
> Mmm. I think you propose something instead of my 'while' loop above:
>
> find $LISTADO_FIND_PRUNED -type f
>
> Where $LISTADO_FIND_PRUNED is a file containing the list of paths to search?
In short, yes, but the $LISTADO_FIND_PRUNED is geenrated by 'find' as a
subshell
find $(program that generates LISTADO_FIND_PRUNED) -type f
See the shell manual page for how to use embedded subshells.
I make use of this facility quite a lot. Coprocessing offers a number
of advantages over seperate sequential, although this isn't the best
example of that.
> I was hooping
> 'find' to have an "--exclude-path", but I can't see such a thing in the
> large manual.
Its there it just isn't called "--exclude-path".
Look: it says
! expression
Negation of a primary; the unary NOT operator.
and
expression [-a] expression
Conjunction of primaries; the AND operator is implied
by the juxtaposition of two primaries or made explicit by
or you might look at
-path pattern
File name matches shell pattern pattern. The
metacharacters do not treat `/' or `.' specially; so, for
example,
find . -path "./sr*sc"
will print an entry for a directory called `./src/misc'
(if one exists).
Now here it is:
To ignore a whole directory tree, use -prune rather than
checking every file in the tree.
So you could EITHER -prune or you could say "not this pattern and not
this pattern and not this pattern"
RTFM for further details
http://www.theunixschool.com/2012/07/find-command-15-examples-to-exclude.html
But this seems to be exactly what you want
http://www.liamdelahunty.com/tips/linux_find_exclude_multiple_directories.php
--
To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org
To contact the owner, e-mail: opensuse+owner@opensuse.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic