I have 2 questions. The first one is for the -sf options and the second one is for the more specific usage of -f options.
By googling, I figured out the description of command ln, option -s and -f.
(copy from http://linux.about.com/od/commands/l/blcmdl1_ln.htm)
-s, --symbolic : make symbolic links instead of hard links
-f, --force : remove existing destination files
I understand these options individually. But, how could one use this -s and -f options simultaneously? -s is used for creating a link file and -f is used for removing a link file. Why use this merged option?
To know more about ln command, I made some examples.
$ touch foo # create sample file
$ ln -s foo bar # make link to file
$ vim bar # check how link file works: foo file opened
$ ln -f bar # remove link file
Everything works fine before next command
$ ln -s foo foobar
$ ln -f foo # remove original file
By the description of -f option, this last command should not work, but it does! foo is removed.
Why is this happening?