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 file.txt as
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?
lnexecutable. If you tried to copy it,cpwould follow the link and copy the target. You can merely instructcpto copy the link if that's what you want too. – Bratchley Jul 14 '13 at 22:06