I am somewhat confused how soft links work in unix. See the example.
% cd /usr/local/
% ls -la
total 6
drwxr-xr-x 2 root root 512 Jan 19 15:03 .
drwxr-xr-x 41 root sys 1024 Jan 20 16:24 ..
lrwxrwxrwx 1 root root 38 Jan 19 15:03 java -> /otherDir/java/jdk1.6.0_17 **<- this is a soft link**
% cd java **<- move to the softlink**
% pwd
/usr/local/java **<- the current location, say LOCATION_A**
% cd /otherDir/java/jdk1.6.0_17/ **<-move to the location of the softlink**
% pwd
/otherDir/java/jdk1.6.0_17 **<- the new current location, say LOCATION_B**
Isn't this problematic that even though LOCATION_A is LOCATION_B, they have different paths?
Is there a command (other than pwd) that will give the real location of a file (not just how the user go there).
It seems to me like pwd is just the sum of a user's cd. NOT their current location.