[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #50058] [wishlist] -prune a subdir(tree) when a file therein matche
From: |
Dale Worley |
Subject: |
[bug #50058] [wishlist] -prune a subdir(tree) when a file therein matches criteria |
Date: |
Tue, 17 Jan 2017 20:46:50 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0 |
Follow-up Comment #3, bug #50058 (project findutils):
True, -depth causes the elements of a directory to be processed before the
directory itself. But there's no specified way to affect the order in which
the items in a directory are processed. I suspect this comes from the
semantics of opendir/readdir/closedir in the earliest versions of Unix. The
only way find could get around this is to read directories completely when it
first enters them and sort the entries itself. Unfortunately, this would make
find vulnerable to bad behavior on very large directories.
OTOH, one could use *nested* invocations of find, as in this gruesome command
line:
find /dir -type d -exec find . -maxdepth 1 -type f -newer XXX \; -prune -print
-false
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50058>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/