308
88
Is there a way to go back to previous directory we were in using bash,tcsh without using pushd/popd ? I'd like to type something like "back" and got returned to the previous directory I was in.
Edit:
"cd -" works, but only for current and previous directories. Is there anyway I can go back to the previous previous previous directory like how you can go back in the web browser?
Regards
1As noted below, you can do so using "pushd" and "popd". – blueyed – 2010-03-05T03:02:53.097
1
Best answer imho : http://unix.stackexchange.com/a/180640/158177 provides cd -1 to cd -9 which I think is what the OP asked for
– Titou – 2016-09-29T15:11:28.5808Just a side note "cd --" goes to the user default direcotry (/home/username) – sdaffa23fdsf – 2012-04-08T22:49:49.593