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.cdon its own changes to the home directory. – Drew Noakes Apr 25 '22 at 01:44