Why doesn't ln -s tell that it fails when creating a symlink to an existing symlinked directory?
Because in the second ln
it doesn't fail it creates a
symlink_dir/dir_2 -> dir_2
symbolic link
Do a:
ls -l symlink_dir/dir_2
And you'll see a (probably broken) symlink there.
That's how ln
is meant to work if the target is a directory (or a symlink to a directory).
A third ln
could fail because there's already a dir_2
inside symlink_dir
(aka dir_2
).