I'm trying to link a directory to another location. Using the following command
ln -sf . dot
succeeds the first time, but it returns an error the second time:
ln -sf . dot
Output:
ln: '.' and 'dot/.' are the same file
This was on UbuntuĀ 16.04.12 (Xenial Xerus).
How can I avoid this error?
You can use
ln -nto not dereference the existing symbolic link. Seeman ln.