bug-findutils
[Top][All Lists]
Advanced

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

[bug #35141] [feature_request] -prune0 action, or a -0 option


From: Eric Blake
Subject: [bug #35141] [feature_request] -prune0 action, or a -0 option
Date: Wed, 21 Dec 2011 13:00:23 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20100101 Firefox/8.0

Update of bug #35141 (project findutils):

                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

Such an option already exists; it is named -print0.

Remember, if you don't specify any of the -ok, -exec, or -print family of
outputs, then find defaults to -print (not -print0).  -prune does not print,
rather, the lack of any other action implies the default of -print.  Your
example was thus parsed as:

find . ( -name 'bin*' -type d -prune ) -print | xargs -r rm -r -- 

when it sounds like you wanted something like:

find . -name 'bin*' -type d -prune -o -print0 | xargs -r rm -r --

or even more efficiently:

find -name 'bin*' -type d -prune -o -delete

I'm closing this as not a bug; there is no need to add -prune0 as a
NUL-printing counterpart of -prune, since -prune doesn't print in the first
place.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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