shadedecho
Programmer
Ok, I know this is gonna sound a bit strange, but here is what I'm trying to accomplish in my file system, and I thought I could do it easily with soft-links:
/ test.txt
test-dir/:
blah.txt --> ../test.txt
/ test.txt
test-dir --> /
Essentially, I want to have a soft-link inside of dir-a/test-dir which points to ../test.txt, meaning a relative soft-link to the file in whatever its parent directory is. This part works just fine.
Then, if I am inside of dir-b/test-dir (which is itself a soft-link to actually dir-a/test-dir), i thought that the soft-link would "follow" the relative positioning of the symlink, meaning that if referencing dir-b/test-dir, that directory would then be referencing dir-b/test.txt.
If I do "cd / and then do "cd ..", I am physically in / not the actual parent of test-dir, which would be "dir-a". The "cd" command respected the relative positioning like I would want.
However, if I do "cd / and I then do "vi ../test.txt", it is actually letting me see dir-a/test.txt, not dir-b/test.txt like I would want.
Is there a way to have the link inside of "test-dir" so that it actually does reference any relative sym-linked parent who is used to access it, for the reading (de-referencing) of files, instead of the absolute parent, when "../test.txt" is specified?
/ test.txt
test-dir/:
blah.txt --> ../test.txt
/ test.txt
test-dir --> /
Essentially, I want to have a soft-link inside of dir-a/test-dir which points to ../test.txt, meaning a relative soft-link to the file in whatever its parent directory is. This part works just fine.
Then, if I am inside of dir-b/test-dir (which is itself a soft-link to actually dir-a/test-dir), i thought that the soft-link would "follow" the relative positioning of the symlink, meaning that if referencing dir-b/test-dir, that directory would then be referencing dir-b/test.txt.
If I do "cd / and then do "cd ..", I am physically in / not the actual parent of test-dir, which would be "dir-a". The "cd" command respected the relative positioning like I would want.
However, if I do "cd / and I then do "vi ../test.txt", it is actually letting me see dir-a/test.txt, not dir-b/test.txt like I would want.
Is there a way to have the link inside of "test-dir" so that it actually does reference any relative sym-linked parent who is used to access it, for the reading (de-referencing) of files, instead of the absolute parent, when "../test.txt" is specified?