This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ln, ls or readline problem?


Hello,

In my home directory named /home/Carlo, I have a directory named foo and under foo is the directory bar:

$ ls -ld foo
drwxr-xr-x  3 Carlo None 0 Nov  9 08:46 foo

$ ls -ld foo/bar
drwxr-xr-x  2 Carlo None 0 Nov  9 08:46 foo/bar

I also have a symbolic link to foo/bar on my home directory named bar2:

$ ls -ld bar2
lrwxrwxrwx  1 Carlo None 7 Nov  9 08:47 bar2 -> foo/bar

Here's the problem:

When I do a `cd bar2' and do an `ls -l ../', here's what I get:

$ pwd
/home/Carlo

$ cd bar2

$ pwd
/home/Carlo/bar2

$ ls -l ../
total 0
drwxr-xr-x  2 Carlo None 0 Nov  9 08:46 bar

As you can see, it shows only `bar' (since ls obviously looks under /home/Carlo/foo)

However, when I go inside bar2, and press the <TAB> after `ls -l ../', I get the contents of /home/Carlo:

$ cd /home/Carlo

$ pwd
/home/Carlo

$ cd bar2

$ pwd
/home/Carlo/bar2

$ ls -l ../<PRESSED THE  TAB KEY HERE>
.addressbook                           desktop/
.addressbook.lu                        dicom.txt.bak
.aspell.en.prepl                       dicom_capture
.bash_history                          foo/
.bash_profile                          fop-0.20.5-bin.tar.gz
.bashrc                                identity
.cvspass                               index.html
.ddd/                                  index.php

In other words, the output of `ls -l ../" shows the contents of the directory relative to the target path of the symbolic link while `ls -l ../<PRESSED TAB>' shows the contents of the directory above the symbolic link.

Which is incorrect, the output of `ls -l ../', or the output of `ls -l ../<PRESSED TAB>'?

Thanks!

Best Regards,

Carlo

--
Carlo Florendo
Astra Philippines Inc.
www.astra.ph


-- 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]