From: "Philip Sainty" <P.Sainty@dtsp.co.nz>
To: <cygwin@cygwin.com>
Subject: Re: Symlink'ed current directory and FIND
Date: Thu, 21 Dec 2000 22:41:00 -0000 [thread overview]
Message-ID: <002201c06be2$07efc970$9401a8c0@WEDGE> (raw)
Wed, 15 Nov 2000 06:35:15 -0800 (PST)
Earnie Boyd <earnie_boyd at yahoo dot com> wrote:
>
> --- Paul Stodghill <stodghil@cs.cornell.edu> 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 <dir> 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
next reply other threads:[~2000-12-21 22:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-21 22:41 Philip Sainty [this message]
2000-12-22 1:06 ` Corinna Vinschen
-- strict thread matches above, loose matches on Subject: below --
2000-11-15 7:28 Earnie Boyd
2000-11-15 8:11 ` Christopher Faylor
2000-11-17 5:55 ` David Starks-Browning
2000-11-15 6:59 Earnie Boyd
2000-11-15 6:51 Paul Stodghill
2000-11-15 6:35 Earnie Boyd
2000-11-15 7:14 ` Lassi A. Tuura
2000-11-15 6:19 Paul Stodghill
2000-11-15 7:20 ` Egor Duda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='002201c06be2$07efc970$9401a8c0@WEDGE' \
--to=p.sainty@dtsp.co.nz \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).