Yes, it's expected behavior. By default, ln will dereference destination symlinks; use the -n option to avoid this.
$ ln -sfn foo2 bar $ ls -l bar -> foo2 foo1 foo2
Yes, it's expected behavior. By default, ln will dereference destination symlinks; use the -n option to avoid this.
$ ln -sfn foo2 bar
$ ls -l
bar -> foo2
foo1
foo2