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?
ln -sfn /other/dir new_dir
works for me. The -n
doesn't dereference the destination symlink.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With