Thank you for your bug report. In this instance, cd returns success because it has actually chdir()'d, the problem comes when bash can't realise the path that it is actually in.
You can see discussion of this problem here: http://groups.google.co.uk/group/gnu.bash.bug/browse_thread/thread/ad71fec768f10fa6/a6dfb11dc2e87403 It isn't clear if it is actually considred a bug or not and if it is, if bash is the cause. I've marked this as needs info because someone with more clue than myself needs to work out where the bug actually lies. ** Changed in: bash (Ubuntu) Status: Unconfirmed => Needs Info -- bash returns wrong error code when changing to nonexisting directory https://launchpad.net/bugs/85552 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs