bug-findutils
[Top][All Lists]
Advanced

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

-iname a -or -iname b -exec: not on all files


From: Carles Pina i Estany
Subject: -iname a -or -iname b -exec: not on all files
Date: Sun, 14 Sep 2008 16:45:26 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello,

I don't know if I've found an "unexpected feature", a bug in find, in
the manual or in me:

If I execute (for example in /usr/share/doc, in a Debian system with
find from findutils 4.4.0):

find . -type f -iname "*copy*" -or -iname "*changelog*" | wc -l
Result: 4619

If I execute:
find . -type f -iname "*copy*" -or -iname "*changelog*" -exec echo {}
\;|wc -l
Result: 2841

Visually checking I can see that echo {} is executed only for
*changelog* files, not for *copy* files.

I can get what I wanted executing:

find . -type f -iname "*copy*" -exec echo {} \; -or -iname "*changelog*"
-exec echo {} \; | wc -l
Result: 4619

(of course, I was not executing echo {} for each file, this is just a
test case)

Is this a bug in the manual? In find? In me? :-)
If it's in find looks a bit important...

Thanks and sorry for the noise, specially if this is not a bug.

-- 
Carles Pina i Estany            GPG id: 0x17756391
        http://pinux.info




reply via email to

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