Last Updated: February 25, 2016
·
786
· alyssa

pushd/popd

Instead of cd, you can use pushd to save the current directory and automatically cd to the specified directory. Then use popd to return to the path you came from.

[/usr/local]$ pushd /etc 
/etc /usr/local
[/etc]$ popd
/usr/local
[/usr/local]$

This is useful when you just need to jump in and out of a directory.