symlink confusion

Ken Lai (min-ken.lai@yale.edu)
Sat, 27 Feb 1999 16:36:50 -0500 (EST)

Symlinks and ".." confuse me sometimes.
It seems that the behavior of symlinks are not very consistent.
(Is it a difference in how the links were made? or shell behavior?)

On my machine, say I have a symlink in home:
foo -> /var/foo
if I do ( cd ; pwd ; cd foo ; pwd ; cd .. ; pwd ) , I get:
/home/ml267
/home/ml267/foo
/home/ml267

In the zoo, there's a link in my home:
cs223 -> /home/classes/cs223/class/lai.min-ken.ml267/
and if I do ( cd ; pwd ; cd cs223 ; pwd ; cd .. ; pwd ) , I get
/home/accts/ml267
/home/classes/cs223/class
/home/classes/cs223/
I'm not returned to the original directory!!

--
# Ken Lai  <min-ken.lai@yale.edu>  also at  ken.lai@WriteMe.com
# http://pantheon.yale.edu/~ml267/     ICQ# 5845632