Today I Learned Quick knowledge bits
Pushd and popd commands
I feel stupid for only finding those today. After years in the terminal.
pushd
saves the current directory on a stack, changes to a specified directory. Then popd
changes back to the top directory and pops it.
pushd /var/log # Now in /var/log, stack contains /homepushd /etc # Now in /etc, stack contains /var/log, /homepopd # Returns to /var/logpopd # Returns to /home
I love those for aliases with agents or for executing build scripts.
Major downside is they are very noisy, so you always got to > /dev/null
.