X-Spam-Check-By: sourceware.org Date: Thu, 19 Jan 2006 17:16:40 -0500 (EST) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com Subject: Re: find reports an internal system loop on cygdrive In-Reply-To: Message-ID: References: <43CF9FD8 DOT 5030208 AT byu DOT net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Thu, 19 Jan 2006, Brian Keener wrote: > Igor Peshansky wrote: > > The real directory is causing find to recurse into the /cygdrive/* > > hierarchy, and that, in turn, causes the internal loop error. Note that > > if you had a c:\bwinrcb file, it would be found with the real /cygdrive > > directory, and not found without it (using your command). Also note that > > in the new versions of Cygwin (probably 1.5.19), /cygdrive will be listed > > in "/" even if it's a virtual directory. > > > > Also, all of what you've described in your message is normal expected > > behavior. > > Okay I think I get it now and just to test you I created a > C:\bwinrcb.txt and then did the find without the -xdev and with only a > virtual cygdrive and sure enough the find failed to find the > C:\bwinrcb.txt file. > > Then I turned around a created a real cygdrive directory in > /cygdrive/c/cygwin and tried the following: > > BrianK AT atl-lt-5783 ~ > $ find / -depth -name "*winrc*" > /cygdrive/c/bwinrcb.txt > find: Filesystem loop detected; `/cygdrive/c/cygwin' has the same device number > and inode as a directory which is 3 levels higher in the filesystem hierarchy. > > BrianK AT atl-lt-5783 ~ > $ find / -xdev -depth -name "*winrc*" > > BrianK AT atl-lt-5783 ~ > $ > > As you can see in the first one it finds the bwinrcb.txt file but you > get the internal loop warning. If I then use the -xdev to prevent the > message it of course doesn't find the file because I essentially told it > now to look there. While it makes sense it does sort of seem like a > catch 22 and still a bit confusing - is the find actually finishing or > is it aborting when it finds the loop and therefore will never search > the entire path it might have access to. > > Thanks for the assistance from all and the additional info. Well, that's easy enough to test as well: just create a "c:\cygwin\bwinrcb.txt" and "c:\q\qwinrcq.txt", make sure that when you do a 'find /cygdrive/c -name "*winrc"', you get them in the following order: ["c:\bwinrcb.txt", "c:\cygwin\bwinrcb.txt", "c:\q\qwinrcq.txt"], and then run the command that prints the message and see if you get the "c:\q\qwinrcq.txt" in the output. However, I'll save you the trouble by noting that, according to the findutils sources, the message is just a warning and doesn't stop further traversal (though it does act like -prune -- the offending directory is not traversed again). Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte." "But no -- you are no fool; you call yourself a fool, there's proof enough in that!" -- Rostand, "Cyrano de Bergerac" -- 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/