dirs

Display or clear the directory stack.

See pushd / popd / dirs for full documentation.

Source: src/scripting/directory_builtin.f90:238-281

Synopsis

dirs [-clpv] [+N | -N]

Options

OptionDescription
-cClear the entire directory stack
-lLong format (don't abbreviate home with ~)
-pOne directory per line
-vOne per line with index numbers

Description

Displays the directory stack. The current working directory is always shown as entry 0 at the top. With no options, prints all entries on one space-separated line.

dirs -v
#  0  /usr/local
#  1  /etc
#  2  /var/log
#  3  ~

Exit Status

StatusCondition
0Success
1Unknown option

See Also