20
6
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
Try tipying a cd /? on your OSX. I did it on Windows but cd don't have such feature. – Diogo – 2012-06-11T15:40:53.440
@Diogo That command does not work on OS X (or any Unix/Linux). – slhck – 2012-06-11T16:17:33.067
@slhck I never used OSX so I really dont know.. My intent was to tell to type a cd -help or something like this to show cd manual. – Diogo – 2012-06-11T16:26:59.030