dirs

dirs [ -c ] [ arg ... ]

or

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

-c

Clear the directory stack.

-l

Print directory names in full instead of using ~ expressions.

-p

Print directory entries one per line.

-v

Number the directories in the stack when printing.