On 4/20/12 4:41 AM, Artur Rataj wrote:
> ~/a$ mkdir .java
> ~/a$ cd symlink
> ~/a/symlink$ cd ../.java/
> ~/a/.java$
> ~/a/.java$ cd ../
> ~/a$ rm -r .java && touch .java
> ~/a$ cd symlink
> ~/a/symlink$ cd ../.java/
> ~/.java$
>
> Should it really be like that?
I can't reproduce it. Is the following an accurate reproduction of what
you did?
z4.local(2)$ cd test
z4.local(2)$ ls -al
total 4
drwxrwxr-x 5 chet admin 170 Apr 22 16:36 ./
drwxrwxr-x 88 chet admin 2992 Apr 22 16:34 ../
drwxrwxr-x 2 chet admin 68 Apr 22 16:36 .hidden/
drwxrwxr-x 2 chet admin 68 Apr 22 16:36 .java/
lrwxrwxr-x 1 chet admin 7 Apr 22 16:36 symlink@ -> ../test
z4.local(2)$ echo $PWD
/usr/local/build/bash/bash-20120420/test
z4.local(2)$ cd symlink
z4.local(2)$ echo $PWD
/usr/local/build/bash/bash-20120420/test/symlink
z4.local(2)$ cd ../.java
z4.local(2)$ echo $PWD
/usr/local/build/bash/bash-20120420/test/.java
z4.local(2)$ cd ..
z4.local(2)$ echo $PWD
/usr/local/build/bash/bash-20120420/test
z4.local(2)$ rm -r .java && touch .java
z4.local(2)$ ls -al
total 4
drwxrwxr-x 5 chet admin 170 Apr 22 16:50 ./
drwxrwxr-x 88 chet admin 2992 Apr 22 16:34 ../
drwxrwxr-x 2 chet admin 68 Apr 22 16:36 .hidden/
-rw-rw-r-- 1 chet admin 0 Apr 22 16:50 .java
lrwxrwxr-x 1 chet admin 7 Apr 22 16:36 symlink@ -> ../test
z4.local(2)$ cd symlink
z4.local(2)$ echo $PWD
/usr/local/build/bash/bash-20120420/test/symlink
z4.local(2)$ cd ../.java
bash: cd: ../.java: No such file or directory
z4.local(2)$ echo $PWD
/usr/local/build/bash/bash-20120420/test/symlink
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/