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.

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 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 at 23:15

1 Answer 1

up vote 3 down vote accepted
rmdir ./--bindir\=/ 

or

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

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