On 04/27/2014 09:39 AM, Carlos E. R. wrote:
I'm trying to produce a list of files with 'find' skipping some paths, but I can't find an optimal method. Maybe I just need more coffe.
Perhaps a better description of what "in" and what's "out" would enable some of us who are slightly more conversant with find to help. You might also try reversing things. The first argument to find is a LIST OF DIRECTORIES. So you might think about that should be in that list and what should not be in it. In fact you might think about find $(list generator) -type f where the embedded script might even be something like find / -type d -maxdepth 3 -path "xxxx" -regex "yyyy" for values of xxxx and yyyy that match your needs, possibly negated. That way you are making find do the work and the outer find only dealing with the directories you want. This strikes me as being less of a load than having find list every file on the file system and then greping some out. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org