URL: <http://savannah.gnu.org/bugs/?50058>
Summary: [wishlist] -prune a subdir(tree) when a file therein matches criteria Project: findutils Submitted by: bern Submitted on: Mon 16 Jan 2017 03:18:40 PM CET Category: find Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Originator Name: Originator Email: Open/Closed: Open Discussion Lock: Any Release: 4.4.2 Fixed Release: None _______________________________________________________ Details: Today, I needed to find the subdirs in a large-ish tree where the application had recently created/updated certain files. So, upon finding such a file, I would have liked to -prune the directory (and its subdirectories) its entry is in. Unfortunately, -prune works only if find is actually looking at the directory itself; it does not have any defined effect if the "file currently examinated" is in fact a file. Would it be possible to implement "-prune $THIS" to, in pseudocode, have the effect of "-type d -prune $THIS -o -prune `dirname $THIS`"? _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?50058> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/