This question already has an answer here:
- Dynamic Symlinks 5 answers
Is there some way in which I can view/edit what the contents of a symbolic link are? I don't want to view the destination the link points to, but the symbolic link itself.
Suppose I have a file,
file.txt and I create a link to
ln -s $HOME/path/to/file.txt .
Now, if I copy this link to a different system, this link will point to nothing if
$HOME expands to something different on the other system, even if the path after
$HOME is still the same. Is there some way to edit the link file so that
$HOME is not expanded before creating the file, but is a part of the file itself?