How to change where a symlink points

If you have an existing symbolic link and you want to change it to link to a new file:

ln -sfn /a/new/path file

This will replace the link with a new one pointing at /a/new/path.

One thought on “How to change where a symlink points”

Leave a Reply

Your email address will not be published. Required fields are marked *