2

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?

  • 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
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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