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: FAQ update suggestion for "I'm having basic problems with find. Why?"


Bill,

While you can do nothing about the legal disclaimer (except, maybe,
precede it with sigdashes ["-- "] so that it gets automatically cut off on
replies by smarter mailers), <http://cygwin.com/acronyms/#PCYMTWLL>.
Thanks.  More below.

On Thu, 8 Jul 2004, William Blunn wrote:

> I have been using *ixy-type systems on and off for what must now be 16
> years, including using "find".
>
> I was using "find" today on an UDF/ISO format DVD-R, and was perplexed
> by it seemingly missing out large chunks of the hierarchy at random.
>
> It seems that "find" has an optimisation relating to the hard link count
> on directories and the presence or otherwise of the "." and ".."
> objects.
>
> If the filesystem you are finding on doesn't have the "." and ".."
> objects then "find" will fail silently(!)
>
> To get it to work, you need to turn the optimisation off with the
> "-noleaf" option.
>
> This is documented in the man page, but when you come to the symptoms
> cold, it looks more like a subsystem issue than an application issue, so
> it didn't occur to me to look in the documentation for "find".
>
> The problem here is that the route to discovery of the solution is
> somewhat tricky.
>
> (In fact you could say that it is a dangerous optimisation in find.  If
> the optimisation is not valid, there are no error messages and it fails
> silently.  I guess I should be looking to see if this issue has already
> come up on the upstream version of find.)
>
> My point is this:
>
> Whilst this is not an issue with Cygwin per se, the nature of Cygwin
> means that this issue will tend to arise commonly with Cygwin, and tend
> not to arise under traditional unixes.
>
> Perhaps it would be a good idea to mention this issue in the Cygwin FAQ?
>
> Possibly as a second point under the existing heading of "I'm having
> basic problems with find. Why?"
>
> We could have an extra paragraph that goes something like this:
>
> If find does not seem to be producing enough results, or seems to be
> missing out some directories, you may be experiencing a problem with one
> of find's optimisations.  See the documentation for the option '-noleaf'
> in the man page.
>
> Bill

Thanks for the report and the analysis.

Alternatively, since this optimization doesn't always seem valid on
Cygwin, perhaps the findutils maintainer will consider turning it off by
default in the Cygwin distribution.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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