Math-Linux.com

Knowledge base dedicated to Linux and applied mathematics.

Home > Linux > Bash > Back to previous directory in shell cd,$OLDPWD

Back to previous directory in shell cd,$OLDPWD

"cd -" works, it will call $OLDPWD i.e. pathname of the previous working directory.

Also in this section

  1. Back to previous directory in shell cd,$OLDPWD
  2. Disable the usage of history using HISTSIZE,HISTFILE
  3. Error "standard in must be a tty" when doing ssh username@server ’sudo command’
  4. Fast and easy way to get mac address on Linux
  5. How to check exit status of a command line in BASH ?
  6. How to Get or Extract filename and extension in bash