On Sat, Sep 8, 2018 at 8:41 AM David Haller <dnh@opensuse.org> wrote:
Hello,
On Mon, 03 Sep 2018, Roger Oberholtzer wrote:
I want to use find to locate files with a specific suffix. The thing is that once I find a file with that suffix, I do not want to continue in that directory or it's sub-directories - especially not any sub-directories. But I do want the search to otherwise continue.
I have seen how to get find to stop after X matches. But that is not what I need. The sub-directories contain 10s of thousands of images. When run over a network, skipping these speed things tremendously.
==== #!/usr/bin/perl -w use strict; use File::Find;
Thanks for that. And I could do the same thing in Tcl (my choice for this type of thing.). I was just curious about a pure command line option. I will try Per's -prune option later today. But I'm not sure how that works when you do not know the name or depth of the directory to skip. Only that a match is already found in the parent directory. So I may wind up fiddling with your script... -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org