Possible Duplicate:
Go back to previous directory in shell
How can I change to the previous directory instead of going up?
is there a command line way to navigate back to the directory I was in?
I frequently do cd ..
to go up a directory, but sometimes I accidentally just do cd
which takes me to the user's home directory.
I want to go back to the directory I was just in, without navigating all the way through the nested folders or without typing the whole path out, which can be very long and prone to errors
I am specifically using OSX, but cd
is pretty universal