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

In an unfortunate series of events, I happened to create a folder named --bindir=. Thing is, I cannot cd to him because when I try to cd I get this message:

bash: cd: --: invalid option
cd: usage: cd [-L][-P [-e]]] [dir]

I also get similar messages for other binaries I am executing with that as a parameter, e.g rm -rf, rmdir, ls etc.

I know this sounds funny, and like those epic fail stories, but I would be glad if you could propose a fix, because I'm all out of them.

As a post of proof that I am not trolling or anything, here is a picture of that epic fail: enter image description here

share|improve this question

marked as duplicate by Marco, NlightNFotis, jasonwryan, Gilles, slm Feb 23 '14 at 0:03

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.

@Marco Oh wow. I searched for an answer, but didn't come up with these. How did I miss them? Voted to close it too. – NlightNFotis Feb 22 '14 at 23:15
up vote 3 down vote accepted
rmdir ./--bindir\=/ 


rm -fr ./--bindir\=/
share|improve this answer

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