dirs
Display the list of currently remembered directories.
SYNTAX
dirs [-l] [-n|-v] Print the directory stack
dirs -S|-L [filename] (+) Save the directory stack to filename
dirs -c (+) Clear the directory stack.
The first form prints the directory stack. The top of the
stack is at the left and the first directory in the stack is
the current directory. With -l, `~' or `~name' in the output
is expanded explicitly to home or the pathname of the home
directory for user name. (+) With -n, entries are wrapped
before they reach the edge of the screen. (+) With -v, entries
are printed one per line, preceded by their stack positions.
(+) If more than one of -n or -v is given, -v takes precedence.
-p is accepted but does nothing.
With -S, the second form saves the directory stack to filename
as a series of cd and pushd commands. With -L, the shell
sources filename, which is presumably a directory stack file
saved by the -S option or the savedirs mechanism. In either
case, dirsfile is used if filename is not given and ~/.cshdirs
is used if dirsfile is unset.
Note that login shells do the equivalent of `dirs -L' on
startup and, if savedirs is set, `dirs -S' before exiting.
Because only ~/.tcshrc is normally sourced before ~/.cshdirs,
dirsfile should be set in ~/.tcshrc rather than ~/.login.
`dirs' is a tcsh shell command.
"After all, what is your hosts' purpose in having a party? Surely not for you to enjoy yourself; if that were their sole purpose, they'd have simply sent champagne and women over to your place by taxi" - P.J. O'Rourke
Related commands:
popd - Restore the previous value of the current directory
saved by `pushd'
pushd - Save and then change the current directory
Equivalent BASH command:
dirs - Display the list of currently remembered directories