When I move a directory elsewhere, a symblink to it will become invalid.
The way I update a symlink mylink is first going into the directory, and then running ln -s "$PWD" mylink, and then mv mylink to the invalid symlink.
I can't create the new symlink in the same directory of the invalid symlink using the above ln command, because ln: failed to create symbolic linkmylink': File exists, so I have to create it elsewhere and then there is an additional mv step.
I wonder if an existing invalid symlink can be edited directly, just like editing a text file in a text editor such as Emacs?
lnsays--no-target-directorymeans "treat LINK_NAME as a normal file". What does that mean? – Tim Mar 04 '15 at 05:26