Command Line Tip Continued
If your anything like me, your always navigating between the same set of directories. Well here’s a tip that I picked up recently which makes that task a little easier.
If your navigating away from a directory you know your going to want to get back to, this command pushes your current directory onto the stack.
pushd .
You can see what’s on your stack by using
dirs
So you’ve navigated somewhere else and you want to get back to the place where you ran pushd, well popd as you may have guessed pops that location off the stack and voila your back where you started.
popd
Obviously there are many other ways you can achieve the same effect like setting up aliases in your bash profile, or even just opening up a new tab in terminal, but I think this one’s worth having in your command line arsenal.
Enjoyed this article? Be sure to subscribe to my RSS feed.
