Demonstration: First try it with regular files: % touch a b % ln -s a c % ll -d ? -rw-r--r-- 1 hjp hjp 0 Feb 6 19:46 a -rw-r--r-- 1 hjp hjp 0 Feb 6 19:46 b lrwxrwxrwx 1 hjp hjp 1 Feb 6 19:46 c -> a % ln -sf b c % ll -d ? -rw-r--r-- 1 hjp hjp 0 Feb 6 19:46 a -rw-r--r-- 1 hjp hjp 0 Feb 6 19:46 b lrwxrwxrwx 1 hjp hjp 1 Feb 6 19:46 c -> b As expected, the link now points to b. But if a and b are directories: % rm a b % mkdir a b % ln -sf a c % ll -d ? drwxr-xr-x 2 hjp hjp 4.0k Feb 6 19:47 a/ drwxr-xr-x 2 hjp hjp 4.0k Feb 6 19:47 b/ lrwxrwxrwx 1 hjp hjp 1 Feb 6 19:46 c -> b/ the link is not changed and there isn't any error message, either.
Oops, I found the link :-) It is created inside of the directory: % ll b total 0 lrwxrwxrwx 1 hjp hjp 1 Feb 6 19:47 a -> a Not very useful. I still think this is a bug.
Actually it's not a bug. At the time a and b are created as directories, c is still a symlink to b, so at this point, c is a directory as well. As expected and documented, ln -sf file directory is the same as ln -sf file directory/file - it's the way ln works (100% the same thing cp does).