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: Tue, 12 Jul 2005 15:47:04 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

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

i understand, but that's not how -ok works.  OK is like -exec, it doesn;t just
ask it actually runs the command.   Hence the nearest thing to what you're
talking about that would actually work is 

find ... -ok true {} \;  -a -exec rm -i {} \; 

As you point out, this would ask twice.  Given the current code, the "true"
command would not be able to read from stdin, but doesn;t try, while the "rm
-i" command would be able to read from stdin.   So, what you wanted already
works.

If you were doing this for real though, this is probably better, but only asks
once:

find ... -ok  rm {} \; 

This is neater, but asks only once, since "rm" would not be able to read from
stdin.


    _______________________________________________________

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]