Sadly, I only learned about this last year by stumbling upon it randomly on the internet. I use it so infrequently that I always forget what it is by the time I need it again.How do you change to your previous directory?
What is the bash shortcut to change to the previous directory?
bash;shell;cd command
The shortcut is -Try cd -If you want to use this in your prompt, you have to refer to it with ~-.See the example:[echox@kaffeesatz ~]$ cd /tmp[echox@kaffeesatz tmp]$ lscron.iddS32  serverauth.CfIgeXuvka[echox@kaffeesatz tmp]$ cd -/home/echox[echox@kaffeesatz ~]$ ls ~-cron.iddS32  serverauth.CfIgeXuvka