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

According to Bash reference on Bash builtins:

cd [-L|[-P [-e]]] [directory]

The -P option means to not follow symbolic links; symbolic links are followed by default or with the -L option. If the -e option is supplied with -P and the current working directory cannot be successfully determined after a successful directory change, cd will return an unsuccessful status.

Can somebody give me an example of situation when -e is useful?

Right now, if I supply -P option with -e (cd -P -e), I'm getting a usage message along with an error telling me that -e is "invalid option". Why is that?

share|improve this question
The -e option was introduced in bash 4.2. What version are you running? – jordanm Feb 24 '13 at 1:39
GNU bash, version 4.2.37(1)-release (i686-pc-linux-gnu) – Quentin Feb 24 '13 at 1:54
up vote 1 down vote accepted

This is a known bug, it will be fixed in the next release. You can see the response to this bug here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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