Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <002201c06be2$07efc970$9401a8c0@WEDGE> From: "Philip Sainty"

To: Subject: Re: Symlink'ed current directory and FIND Date: Fri, 22 Dec 2000 19:40:10 +1300 Organization: DTSP MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Wed, 15 Nov 2000 06:35:15 -0800 (PST) Earnie Boyd wrote: > > --- Paul Stodghill wrote: > > Why doesn't FIND find files in the current directory when the current > > directory is accessed via a symlink? > > > > Find doesn't dereference symbolic links unless you tell it to. The command > find -follow -type f > would display the files you want displayed. Not necessarily... I just noticed this when trying to find real directories under a symlinked directory. Naturally I don't want other symlinks to appear, so -follow doesn't help. Rather unfortunate behaviour. It would certainly be nice if this was changed to match other versions of find. It doesn't seem like it would be too difficult, seeing as how test is able to make the required distinction: $ ln -s

foo $ find foo -type l foo $ find foo/. -type l foo/. $ if test -L foo ; then echo link; fi link $ if test -L foo/. ; then echo link; fi $ Is it too simplistic to imagine that a call to test (or the relevant code thereof) be made in find to determine whether the given path is actually a symlink? It only needs to happen once per find, so wouldn't cause much of a hit on performance. cheers, -Philip -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple