URL:
<http://savannah.gnu.org/bugs/?34159>
Summary: -path and -prune with -print and without have
different result.
Project: findutils
Submitted by: gavenkoa
Submitted on: Вск 28 Авг 2011 22:45:38
Category: find
Severity: 3 - Normal
Item Group: Wrong result
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.5.9
Fixed Release: None
_______________________________________________________
Details:
$ mkdir dir
$ touch dir/file
$ find . -path '*/file' -prune -o -type f
.dir/file
$ find . -path '*/file' -prune -o -type f -print
<nothing>
Emacs uses pattern
find . '(' -path '*/dir1' -o ... -path '*/dirn' ')' -prune -o -type f -name
'GLOB' -print0 | xargs -0 -nH grep 'REGEX'
for 'M-x rgrep' to exclude certain directories dir1...dirn (from
'grep-find-ignored-directories' variable).
As you can see from example if add -print/-print0 find can not find file with
name same as in -path arg, but without can.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?34159>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/