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
cd --
is equivalent tocd
. No need to type the--
unless you want to separate a list of paths from a list of options to avoid ambiguity. In your case, there's no such list, so the--
is redundant.cd
on its own changes to the home directory.