symbolic link question

Price, Erik eprice at ptc.com
Tue Dec 3 14:46:17 EST 2002


Hello,

I have created a symbolic link in my home directory that points to another directory on the server.  This is a nice shortcut to that other directory.  However, when I cd into the other directory through my symbolic link, then echo the current working directory with either "pwd" or "echo $PWD", the pathname takes into account the fact that I accessed it from a symbolic link.

I'm not disputing this, but rather I'm curious of what's keeping track of this -- my shell session (bash)?  I would have made the assumption that once I switched to the other directory, I am now for all intents and purposes in that other directory with no memory of the original, but in this I am wrong.

I'm not really new to Unix but I must admit that I've never really experimented with symlinks before.

(Also, I've found a nice workaround is to use an environment variable containing the path to the other directory, and instead of "cd symLinkedDirectory" just use "cd $otherDirectory".)


Erik



More information about the gnhlug-discuss mailing list