bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #20865] -delete interacts with -prune


From: anonymous
Subject: [bug #20865] -delete interacts with -prune
Date: Thu, 23 Aug 2007 11:30:48 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/419.3 (KHTML, like Gecko) Safari/419.3

Follow-up Comment #4, bug #20865 (project findutils):

James: I have not looked into your patch, but I don't really understand whose
proposal you are following.

To clarify:

- The fix that I would prefer the most, would be to make -delete work with
either type of traversal (depth or normal). Of course, if you want to make
-delete delete directories, you have to assure that these directories are
empty, or, if you want to empty them as a part of the traversal, you have to
select a -depth traversal explicitly.
Advantage: if you are only going to delete files, you can still use -delete
and a normal traversal and thus -prune; with all the other solutions, if you
require pruning, you have to resort some -print0 | xargs -0 rm, which is
suboptimal. (Alternatively, Eric Blake suggest to use a -wholename test as a
workaround for a -prune, but isn't it less efficient?)

- The fix that Eric Blake seems to prefer the most, would be to issue an
error when find detects that its condition contains both -delete and -prune
but no explicit -depth, since in that case, the user probably does not expect
for the -prune to get ignored, or he should at least be notified of the
potential danger.
Advantage: least likely to be backwards incompatible

- You seem to propose to make -delete require an explicit -depth in any case
(not just a -prune). This is backwards incompatible, and you still have to
delete with "rm" in case you need pruning?

Regards,
Bruno De Fraine

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?20865>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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