public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Re: Problems with find
@ 2003-02-05 16:35 fj_br_
  2003-02-05 16:53 ` Randall R Schulz
  0 siblings, 1 reply; 2+ messages in thread
From: fj_br_ @ 2003-02-05 16:35 UTC (permalink / raw)
  To: CarloFlorendo, cygwin; +Cc: cygwin, fj_br_

cygwin@cygwin.com schrieb am 31.01.03 16:47:10:
> 
> For the archives: No.  This is not going to do what the OP wants at all.
> In fact, if there's more than one file named 1000.*, it won't even work
> (find will produce a "find: paths must precede expression" error).  For
> details, "info find" and "info bash".
> 
> To the OP: Is your 1000 directory a symbolic link, by any chance?  If it
> is, try the "-follow" option.  For details, "info find".
> 	Igor
> 
Thanks for the hint with -follow it worked, but the directory 1000 is not a symbolic link as you can see

$ find . -name 1000\* -follow
./1000.zip
./1000
./1000/1000.zip

$ ls -ld 1000
drwxr-xr-x    2 f.braunb unknown         0 Jan 31 08:33 1000

$ ls -l 1000*
-rw-r--r--    1 f.braunb unknown  162114808 Jan 30 14:57 1000.zip

1000:
total 158316
-rw-r--r--    1 f.braunb unknown  162114808 Jan 31 08:33 1000.zip

Could this be a bug?


    Franz


> On Fri, 31 Jan 2003, Carlo Florendo wrote:
> 
> > find . -name 1000.*
> >
> > ----- Original Message -----
> > From: <fj_br_@web.de>
> > To: <cygwin@cygwin.com>
> > Sent: Friday, January 31, 2003 5:57 PM
> > Subject: Problems with find
> >
> >
> > Hi folks,
> >
> > I trie to search file with find an didn't find all the file which should be
> > found
> >
> > I search for all file starting with 1000 an the file 1000.zip in the
> > diretory 1000 is not found
> > $ find . -name 1000\*
> > ./1000.zip
> > ./1000
> >
> > but when I ls the directory 1000 the file is listed
> > $ ls 1000
> > 1000.zip
> >
> > As you can see I use the find installed in /usr/bin
> > $ which find
> > /usr/bin/find
> > $ type find
> > find is hashed (/usr/bin/find)
> >
> >
> > what is wrong? Is it a bug or my fault?
> >
> > Thanks for any help and hint
> >
> > Franz
> 
> -- 
> 				http://cs.nyu.edu/~pechtcha/
>       |\      _,,,---,,_		pechtcha@cs.nyu.edu
> ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
>      |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
>     '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!
> 
> Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
>   -- /usr/games/fortune
> 
> 
> --
> 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/
> 


______________________________________________________________________________
Keine Chance für Viren! Mit WEB.DE FreeMail sind Sie auf der
sicheren Seite - Virenschutz inklusive! http://freemail.web.de/features/?mc=021129


--
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Re: Problems with find
  2003-02-05 16:35 Re: Problems with find fj_br_
@ 2003-02-05 16:53 ` Randall R Schulz
  0 siblings, 0 replies; 2+ messages in thread
From: Randall R Schulz @ 2003-02-05 16:53 UTC (permalink / raw)
  To: cygwin

Carlo,

At 08:35 2003-02-05, fj_br_@web.de wrote:
>cygwin@cygwin.com schrieb am 31.01.03 16:47:10:
> >
> > For the archives: No.  This is not going to do what the OP wants at all.
> > In fact, if there's more than one file named 1000.*, it won't even work
> > (find will produce a "find: paths must precede expression" error).  For
> > details, "info find" and "info bash".
> >
> > To the OP: Is your 1000 directory a symbolic link, by any chance?  If it
> > is, try the "-follow" option.  For details, "info find".
> >   Igor
>
>Thanks for the hint with -follow it worked, but the directory 1000 is 
>not a symbolic link as you can see
>
>$ find . -name 1000\* -follow
>./1000.zip
>./1000
>./1000/1000.zip
>
>$ ls -ld 1000
>drwxr-xr-x    2 f.braunb unknown         0 Jan 31 08:33 1000
>
>$ ls -l 1000*
>-rw-r--r--    1 f.braunb unknown  162114808 Jan 30 14:57 1000.zip
>
>1000:
>total 158316
>-rw-r--r--    1 f.braunb unknown  162114808 Jan 31 08:33 1000.zip
>
>Could this be a bug?

What bug are you suggesting? There's a directory named "1000" and it 
contains a file called "1000.zip". That's all very clear by what's 
shown here. Perhaps this situation arose earlier in your confusion 
about shell glob characters, find and whatnot.

Sometimes in circumstances like this, confusion can be reduced by using 
the "-i" option to ls. This will cause ls to include the "inode number" 
in its output. (This is not quite the same thing in Cygwin as in real 
Unix file systems, but it's there and serves the purpose of this hint.)

Distinct files that are otherwise identical and, beyond their full path 
names, indistinguishable (same name, size, modes, owners, etc.) will 
have different inode numbers. Likewise, hard links (possible with NTFS 
but not FATn) will have identical inode numbers even if their names are 
different. However, given that hard links are just multiple names for 
the same file, it's impossible to have any other file attribute differ 
between two hard links to the same file.

One last wrinkle to note is that if you attempt to create a hard link 
on a FAT file system volume, Cygwin will copy the file for you. That's 
its best-effort attempt to comply with a request that cannot literally 
be fulfilled but which is nonetheless required by POSIX compliance. 
(I'm presuming a bit here as to motivation for the fallback behavior 
for hard linking on FAT file systems.)

Randall Schulz


>     Franz
>
>
> > On Fri, 31 Jan 2003, Carlo Florendo wrote:
> >
> > > find . -name 1000.*
> > >
> > > ----- Original Message -----
> > > From: <fj_br_@web.de>
> > > To: <cygwin@cygwin.com>
> > > Sent: Friday, January 31, 2003 5:57 PM
> > > Subject: Problems with find
> > >
> > >
> > > Hi folks,
> > >
> > > I trie to search file with find an didn't find all the file which 
> should be
> > > found
> > >
> > > I search for all file starting with 1000 an the file 1000.zip in the
> > > diretory 1000 is not found
> > > $ find . -name 1000\*
> > > ./1000.zip
> > > ./1000
> > >
> > > but when I ls the directory 1000 the file is listed
> > > $ ls 1000
> > > 1000.zip
> > >
> > > As you can see I use the find installed in /usr/bin
> > > $ which find
> > > /usr/bin/find
> > > $ type find
> > > find is hashed (/usr/bin/find)
> > >
> > >
> > > what is wrong? Is it a bug or my fault?
> > >
> > > Thanks for any help and hint
> > >
> > > Franz


--
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-05 16:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-05 16:35 Re: Problems with find fj_br_
2003-02-05 16:53 ` Randall R Schulz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).