I was doing some work that involved moving between several directories. Remembering about pushd and popd, I googled around to try and find out how to use them properly. I found this article which was helpful, but what was even better was one of the comments talking about “cd -“.
1 2 3 4 5 6 7 8 9 10 |
|
What it does is cycle you between your last two directories. It also operates outside of the pushd/popd stack:
1 2 |
|
So you should still be able to use those!