Strange goings on with the humble link...
Simon Egerton <[email protected]> Thu, 13 Feb 2003 10:53:28 -0000
| Newsgroups | gmane.comp.gnu.fileutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
Dear Gnu, I would like to attain how a symbolic link to a directory should be dereferenced. I give an example, 1) From / 2) mkdir etc2 3) cd etc2 4) ln -s /etc/sysconfig 5) echo > myfile.txt 6) cd sysconfig 7) ln -s ../myfile.txt linktomyfile.txt Now, if I type pwd "/etc2/sysconfig" is returned, if using the "bash" shell I type ls ../ [tab] the content of /etc2 is listed, if I type ls ../ [return], the content of /etc is listed, if I type cd .., I return to /etc2, the link created in step 7 dereferences from /etc/sysconfig and not /etc2/sysconfig. To me this behaviour is inconsistent, is this a bug? If this is intended, then how may I create a link that would dereference from the "pwd" path rather than the path pointed to by the link? i.e. make the link created in step 7 work? Thanks for you time, With best regards, Simon.