dirs [ -c ] [ arg ... ]


dirs [ -lpv ]

With no arguments, print the contents of the directory stack. Directories are added to this stack with the pushd command, and removed with the cd or popd commands. If arguments are specified, load them onto the directory stack, replacing anything that was there, and push the current directory onto the stack.

Option Description


Clear the directory stack.


Print directory names in full instead of using ~ expressions.


Print directory entries one per line.


Number the directories in the stack when printing.