bug-findutils
[Top][All Lists]
Advanced

[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: Jochen Bern
Subject: [bug #50058] [wishlist] -prune a subdir(tree) when a file therein matches criteria
Date: Mon, 16 Jan 2017 14:18:41 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]