LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   symlink to symlink confusion, (https://www.linuxquestions.org/questions/linux-newbie-8/symlink-to-symlink-confusion-4175525797/)

Reprovo 11-18-2014 02:06 PM

symlink to symlink confusion,
 
I came across this symlink to a symlink

$ cd /usr/java
$ sudo ln -s $PWD/jdk1.7.0_05 latest
$ sudo ln -s $PWD/latest default

I'm confused about the second symlink.
I know It points to the same directory as 'latest'
/opt/JDK/jdk1.7.0_05
It seems from the syntax that 'default' would point to
/opt/JDK/opt/JDK/jdk1.7.0_05

suicidaleggroll 11-18-2014 02:09 PM

Why would you think that?

/usr/java/default will point to /usr/java/latest
/usr/java/latest will point to /usr/java/jdk1.7.0_05

Reprovo 11-18-2014 02:17 PM

Ok. I get It! I was thinking about It like a symlink was some kind of variable that holds a path but It's Just pointing to something.
I don't know why I had that Idea In my head.
Thanks.


All times are GMT -5. The time now is 11:49 PM.