delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
X-MimeOLE: | Produced By Microsoft Exchange V6.0.5762.3 |
MIME-Version: | 1.0 |
Subject: | ls .. not respecting symbolic links |
Date: | Tue, 10 Dec 2002 11:29:52 -0500 |
Message-ID: | <3D848382FB72E249812901444C6BDB1D0BA9CD@exchange.timesys.com> |
X-MS-Has-Attach: | |
X-MS-TNEF-Correlator: | |
From: | "Robb, Sam" <sam DOT robb AT timesys DOT com> |
To: | <cygwin AT cygwin DOT com> |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id gBAGV6Z30235 |
All, My apologies if this is a report of expected behavior. I'm primarily a Windows user, and despite spending the last year in Linux/Cygwin lands, I'm still very new to some things :-/ Create a symlink to a directory: $ cd /tmp $ ls $ ln -s /cygdrive/c/TEMP c_temp $ cd c_temp At this point, I'd expect "ls .." to give me a listing of /tmp. Instead, I get a listing for /cygdrive/c: $ ls -la .. total 733 -rwxr-xr-x 1 sam.robb unknown 0 Sep 7 2001 AUTOEXEC.BAT -rw-r--r-- 1 sam.robb unknown 0 Sep 7 2001 CONFIG.SYS (etc) Similarly, "find .. -maxdepth 1" gives: $ find .. -maxdepth 1 .. ../AUTOEXEC.BAT ../boot.ini ../CONFIG.SYS (etc) On the other hand, using "ls $PWD/.." gives the contents of /tmp, as does "find $PWD/.. -maxdepth 1": $ ls -la $PWD/.. total 4 drwxr-xr-x 2 sam.robb unknown 0 Dec 10 11:01 . drwxr-xr-x 15 sam.robb unknown 4096 Dec 4 16:30 .. lrwxrwxrwx 1 sam.robb unknown 103 Dec 10 11:01 c_temp -> /cygdrive/c/TEMP $ find $PWD/.. -maxdepth 1 /tmp/c_temp/.. /tmp/c_temp/../c_temp I see the same behavior under Linux, so the question is: is this a bash bug, or expected behavior? -Samrobb -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |