So there was a file dummy1. I created a symlink:ln -snf dummy dummy1and confused source and target file, as I actually wanted dummy to point to dummy1 not vice versa.So now dummy1 is a symlink.Is the original dummy1 file removed by doing this? Any way to get it back?I would expect to get it back somehow, because otherwise that would be strange, as even rm command asks for confirmation.Thank you
Is existing file removed when a symlink is created with the same name?
linux;shell;ln
I hope you have a backup of dummy1! From the man page for ln:   -f, --force          remove existing destination filesSo dummy1 has been removed and replaced by the symlink.If you want to prevent this in the future, do not use the -f flag to ln.