This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: possible problem with "find . -name blah -o -name blah2"


> using CYGWIN_NT-6.1, bash 4.1.11(2) and find 4.5.12, the following returns
> immediately

>    find . -name \*.cs -o -name \*.h -o -name \*.cpp -exec ls {} \;

> pick your favorite for 'ls'

$ uname -a
CYGWIN_NT-5.1 daemon2 1.7.32s(0.274/5/3) 20140807 16:26:58 i686 Cygwin

$ find . -name \*.cs -o -name \*.h -o -name \*.cpp -exec ls {} \;

> this works as expected

>    find . -name \*.cs -o -name \*.h -o -name \*.cpp

> it's probably not a horrible problem but i thought i'd report it.

Can't seems to replicate it on my setup. Do you use 64-bit Cygwin?

Discussion aside, please use -execdir rather than -exec to avoid race
conditions in a time gap between find's decision to run something and
actually running that something.

Andrey Repin ( 21.08.2014, <02:39>

Sorry for my terrible english...

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]