I am trying to understand the nature of ..
(double dot). It seems to point to different targets depending on how you access it.
Example:-
/outer/
middle/
inner/
inner --> ./middle/inner/
Now, /outer/middle/inner/..
leads to /outer/middle/
, but if I access it through the symbolic link, /outer/inner/..
leads to /outer/
. It seems that there are two different ..
here.
What is ..
exactly? symbolic link? hard link? Or is it dynamically generated depending on the path when the directory is accessed? Or perhaps my understanding of symbolic links is wrong.
Edit:
Other related observation
/outer/
middle/
file
inner/
f --> ./../file
inner --> ./middle/inner/
Now if I try to access file through /outer/inner/f
it works. But it shouldn't since /outer/inner/../file
does not point to a file. the file is in /outer/middle/inner/..
. This seem to contradict the behavior in above!?