Posted on Saturday, March 31, 2001 @ 09:37:03 PM CST by David Yee [profile] [read 3414 times]
Sometimes after you cd to a different directory you might want to go back to the directory you were just in. There is an environment variable called OLDPWD that holds that information. This can come in handy especially if that directory is long. Instead of typing "cd path_to_old_directory" all you have to do is type "cd $OLDPWD". Even better you can make an alias of this to something shorter in your .bashrc, e.g.:
alias cdp='cd $OLDPWD'
Please rate this article or post a brief review of Go back to the last directory or comment on benchmark/performance, features, availability, price or anything else regarding Go back to the last directory. Thanks!