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?

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.


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.

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