Update of bug #34159 (project findutils):

                  Status:                    None => Invalid                
             Assigned to:                    None => ericb                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #2:

Not a bug.  -prune is documented as only having an action on directories, not
regular files - so -prune does not trim files.


$ find . -path '*/file' -prune -o -type f


is strictly equivalent to:


$ find . ( -path '*/file' -prune -o -type f ) -print


-path '*/file' is true for dir/file, -prune is always true but has no effect,
so the -o does not kick in, then the implicit -print prints the file name. 
Meanwhile:


$ find . -path '*/file' -prune -o -type f -print


is strictly equivalent to:


$ find . ( -path '*/file' -prune ) -o ( -type f -print )


-path '*/file' is true, -prune is true and has no effect, so the -o does not
kick in, and there is nothing left to -print the file name.


    _______________________________________________________

Reply to this item at:

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

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


Reply via email to