Remove a File - Help Needed

Hi,

I have created a file "-f.txt" or "-f" and now i want to remove this file, I have tried rm -f -f, but you would have understood the problem i am facing. Now please let me know what needs to be done, Also one more question i want to know the difference between Hard Link and Soft Link and which one shoud be preferred.
The above two questions were asked for an interview, please help.

Thanks in advance. :slight_smile:

rm -f ./-f
or

rm -f -- -f

Hey thanks a lot, however can you let me know the difference between hard and soft link and which link needs to be preferred. Thanks for your cooperation

hard link and original file are recodrs in different directories that reference to one index in the file system (hard link can be created only in the file system of original file, hard link and original file cannot be distinguished)
soft link like a shortcut in windows -this is a new file that stores path to the original one (there are 2 indexes, may be in different file systems)