If you’ve switched into another folder with the cd command, and then want to get back to the previous one, you don’t have to remember the whole path. Just use the following command:
This will switch back to the previous directory. For instance, if you were in /var/www/vhosts/default and then switched to /etc, you could simply use the cd – command to switch back.
Programmer by day, geek by night, The Geek, also known as Lowell Heddings, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on Google+ if you'd like.
- Published 07/30/10