summaryrefslogtreecommitdiff
path: root/devdocs/bash/the-directory-stack.html
blob: 5a1d7d0d88fadb39f65a877274dcf59c6531e802 (plain)
1
2
3
4
5
6
<h1 class="section">The Directory Stack</h1>  <p>The directory stack is a list of recently-visited directories. The <code>pushd</code> builtin adds directories to the stack as it changes the current directory, and the <code>popd</code> builtin removes specified directories from the stack and changes the current directory to the directory removed. The <code>dirs</code> builtin displays the contents of the directory stack. The current directory is always the "top" of the directory stack. </p> <p>The contents of the directory stack are also visible as the value of the <code>DIRSTACK</code> shell variable. </p> <ul class="section-toc"> <li><a href="directory-stack-builtins" accesskey="1">Directory Stack Builtins</a></li> </ul><div class="_attribution">
  <p class="_attribution-p">
    Copyright &copy; 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.<br>Licensed under the GNU Free Documentation License.<br>
    <a href="https://www.gnu.org/software/bash/manual/html_node/The-Directory-Stack.html" class="_attribution-link">https://www.gnu.org/software/bash/manual/html_node/The-Directory-Stack.html</a>
  </p>
</div>