Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

I have a file which I wrote and not thinking put the actual filename in single quotes like this:


When I try to remove it using rm -f 'filename' it does not recognize that it is there I get the error:

rm: cannot remove 'filename'. No such file or directory.

Any suggestions?

share|improve this question

marked as duplicate by Ƭᴇcʜιᴇ007, Daniel Andersson, Synetech, Andrew Lambert, Carl B Dec 20 '13 at 14:43

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.

2 Answers 2

Quote the quotes.

rm "'filename'"
share|improve this answer

Another option (in addition to @IgnacioVasquezAbrams's) is to escape the '

rm \'filename\'

enter image description here

share|improve this answer