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 The contents of this e-mail and any attachments are confidential and may be legally privileged. If you have received this e-mail and you are not a named addressee, please inform us as soon as possible on +44 118 901 2999 and then delete the e-mail from your system. If you are not a named addressee you must not copy, use, disclose, distribute, print or rely on this e-mail. Any views expressed in this e-mail or any attachments may not necessarily reflect those of Tao's management. Although we routinely screen for viruses, addressees should scan this e-mail and any attachments for viruses. Tao makes no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that for the protection of our business, we may monitor and read e-mails sent to and from our server(s). -- 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/