will change the pwd to the last directory.
Is there a way to know which directory it is, so that I'll know where I am CD'ing to?
migrated from stackoverflow.com Dec 19 '09 at 2:46
This question came from our site for professional and enthusiast programmers.
You can also use ~- (anywhere you can use tilde expansion) instead of $OLDPWD:
There is also ~+ for $PWD, which is useful for commands which require an absolute directory:
Note that things like