find Exhibits Strange Behavior ?

Paul T. Karch pkarch@stargate.net
Sun Jan 19 12:29:00 GMT 2003


After I startup with cygwin.bat I am put
into the /home/user directory.
If I try to do any of the commands:
find . -iname *.c
find  -iname *.c
find / -iname *.c

I get the following:

find: paths must precede expression
Usage: find [path...] [expression]

If I enter:
find *.c
it works OK, but not recursively
(as I found out in a 2nd pass on the test).

I made a subdirectory of  "user"; copied some files;
 and cd'ed to it and entered:

find  . -iname *.c

it works fine.

If  I cd to / and enter
 find . -iname *.c
it displays some results, but if I
cd to usr and issue the same command
I get more results than I got in the "higher"
/ directory.  But doesn't this  mean that
find is not working recursively as it should ?

However under "/" I changed the command to
find / -iname '*.c' 
and it worked as I expected.  Thus emboldened,
I cd'ed to ~ and tried   find . -iname '*.c'     and
it worked fine.

This is not really a problem, I guess, but it is curious.
Also I may not be interpreting the meaning of the find command
properly.  Any comments ?

Paul T. Karch

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: goof.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20030119/26a5b899/attachment.txt>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list