I have created a symbolic link:
sudo ln -s /some/dir new_dir
Now I want to overwrite the symbolic link to point to a new location and it will not overwrite. I have tried:
sudo ln -f -s /other/dir new_dir
I can always sudo rm new_dir, but I would rather have it overwrite accordingly if possible. Any ideas?
sudo rm new_dir
ln -sfn /other/dir new_dir
works for me. The -n doesn't dereference the destination symlink.
-n
1.4m articles
1.4m replys
5 comments
57.0k users