if I create a folder inside my current folder, say logs:-
mkdir log
ln -s -f log all_logs
such that all_logs points to the log directory.
ls -ltr
Jan 7 23:33 log
Jan 7 23:33 all_logs -> log
When i run ln -s -f log all_logs
again, a recursive symlink gets created inside the log directory, named log.
ls -ltr log/
Jan 7 23:33 log -> log
Why does this happen ? Shouldnt the existing symlink only get unlinked and relinked ( with the -f option) ? Why is this recursive behaviour occurring?