Is there any way to create a symbolic link which points to another symbolic link?
I have link A (pointing to address1 = /home/data/username/var
) in /home/data directory
and I need to create link B in /home directory
which is points to link A.
If I do ln -nfs /home/B /home/data/A
, it doesn't work.
Best Answer
The argument order is
So you'd want
Update: I'd forgotten the
-s
flag in my sample, so it was trying to create hard links, which WILL traverse symlinks to try and point at whatever the link is pointing at. With symlinks, you can nest them as deep as you want: