I'm a little confused about how soft links work in unix. See an 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 it a problem that although LOCATION_A LOCATION_B, they have different paths?
Is there a command (other than pwd) that will give the actual location of the file (and not just how the user goes there).
It seems to me that pwd is just the sum of user cd. NOT their current location.
unix directory symlink pwd
sixtyfootersdude
source share