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

I have file with name --help.tgz. I want to delete but don't know how. I tried rm "--help.tgz", rm \-\-help.tgz and it did not work. How can I delete a file with such name?

share|improve this question

marked as duplicate by Michael Mrozek Apr 21 '13 at 0:59

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.

up vote 1 down vote accepted

Try: rm -- --help.tgz

The -- tells rm that there are no further flags to process and that everything else are the files/directories to be deleted. Most unix utilities use -- in a similar way.

share|improve this answer

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