Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here are some options

a) rm -f

b) rm "-f" (double quotes)

c) rm '-f' (single quotes)

d) all of the above

e) none of the above

share|improve this question

marked as duplicate by manatwork, Anthon, Mat, Stéphane Chazelas, slm Jul 29 '13 at 16:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

This is the least effort somebody has put into disguising their homework questions in a long time – Michael Mrozek Jul 29 '13 at 17:57

There are two options. You can use -- to tell rm that there are no more options. The second way is to specify the relative or absolute path to the file.

Here are some examples:

rm -- -f
rm ./-f
rm /path/to/-f
share|improve this answer
thanks, so that's e) none of the above, right? – siamii Jul 29 '13 at 20:14
@siamii, yes, none of the above – jordanm Jul 29 '13 at 20:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.