Bash - dirs (list of remembered directories)
Stack/list of remembered directories.
You can change of directories and return to the directory from which you came.
dirs [-clpv] [+n] [-n]
- +n Displays the nth entry counting from the left of the list shown by dirs when invoked without options, starting with zero.
- -n Displays the nth entry counting from the right of the list shown by dirs when invoked without options, starting with zero.
- -c Clears the directory stack by deleting all of the entries.
- -l Produces a longer listing; the default listing format uses a tilde to denote the home directory.
- -p Print the directory stack with one entry per line.
- -v Print the directory stack with one entry per line, prefixing each entry with its index in the stack.
The return value is 0 unless an invalid option is supplied or n indexes beyond the end of the directory stack.
The default display is on a single line with directory names separated by spaces.