bug-findutils
[Top][All Lists]
Advanced

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

[bug #13650] find -exec rm -i {} ; broken since 4.2.12


From: James Youngman
Subject: [bug #13650] find -exec rm -i {} ; broken since 4.2.12
Date: Sun, 10 Jul 2005 01:29:13 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050610 Firefox/1.0.4 (Debian package 1.0.4-3)

Follow-up Comment #5, bug #13650 (project findutils):

One potential problem here is that if a prepared file is being fed to find on
stdin, the command executed by -ok can steal its input.     That's why the
current findutils code runs programs for "-ok" with stdin redicrected from
/dev/nul, but still runs programs for "-exec" with stdin unchanged.

In the example you give I assume you're changing the -o in the example to
-a:

find a b c -mtime 2 -ok prog1 {} \; -a -exec rm -i {} \;

That is, if "prog1" returns 0, rm -i will be called on the file currently
being considered.  That will work with the (now) current development code. If
that's what you're asking for, no problem, that's what we have right now.  Or
are you asking for something else?



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13650>

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





reply via email to

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