Pushd

From wiki
Revision as of 11:46, 17 November 2021 by Hdridder (talk | contribs) (Created page with "Category:Unix/Linux Usefull in scripts when you have do change directory and want to return to where you started. ;pushd <dir> :Change directory to <dir> (like cd) and add...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Usefull in scripts when you have do change directory and want to return to where you started.

pushd <dir>
Change directory to <dir> (like cd) and add <dir> to the directory stack.
popd
Pop the last directory from the directory stack and change directory to the top of the stack (return to previous directory)
dirs
Show the current directory stack