ln -fFs does not update symlink I have two directories newdir and otherdir and would like to update a symlink, that initially pointed to otherdir to newdir.

When I run:

&gt; ln -s otherdir symlink 


I see a symlink:

&gt; ls -al symlink
symlink -&gt; otherdir


When I run:

&gt; ln -sFf newdir symlink


I would expect symlink -> newdir, but I see the old link when I run:

&gt; ls -al symlink
symlink -&gt; otherdir


And I also noticed that a new symlink exists: 

&gt; ls -al symlink/newdir
symlink/newdir -&gt; newdir


Is there a way to prevent ln from interpreting the destination path as parent directory ?
Or is the only way to prevent this from happening to remove the link first ?
Use the -h option:


-h    If the target_file or target_dir is a symbolic link, do not follow it. 
      This is most useful with the -f option, to replace a symlink 
      which may point to a directory.



$ ln -shf newdir symlink
$ ls -al symlink
symlink -&gt; newdir