I'm trying to use external cd (/usr/bin/cd) to jump to parent directory /usr/bin/cd .. but it doesn't work (no error message, current directory remains as was). I know this is a builtin bash command and this whole operation is pointless but it's part of school assignment, any ideas how to achieve it?


I found the answer myself. Proper usage is:

. /usr/bin/cd ..
| improve this answer | |
  • 1
    that only works if /usr/bin/cd is implemented as a shell script. It doesn't have to be, though that would be a trivial implementation. – ilkkachu Mar 30 at 20:49

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.