dirs
Displays or manipulates the directory stack. The directory stack is a list of recently visited directories that can be manipulated with thepushd
andpopd
commands. More information: https://www.gnu.org/software/bash/manual/bash.html#Directory-Stack-Builtins.
-
Display the directory stack with a space between each entry:
dirs
-
Display the directory stack with one entry per line:
dirs -p
-
Display only the nth entry in the directory stack, starting at 0:
dirs +{{N}}
-
Clear the directory stack:
dirs -c
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.