I have 2 questions. First one is for the
-sf options and second one is for the more specific usage of
By googling, I figured out the description of command
-s, --symbolic : make symbolic links instead of hard links -f, --force : remove existing destination files
I understand these options individually. But, how could use this
-f options simultaneously?
-s is used for creating a link file and
-f is used for removing a link file. I can't understand this situation and 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?