Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

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.

1 Answer

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
add comment

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