O'Reilly logo

Linux in a Nutshell, 6th Edition by Robert Love, Stephen Figgins, Ellen Siever, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

dirs

Synopsis

dirs [-clpv] [+n] [-n]

Print the directory stack, which is managed with pushd and popd.

Options

+n

Print the nth entry from the left; first entry is zero.

-n

Print the nth entry from the right; first entry is zero.

-c

Remove all entries from (clear) the directory stack.

-l

Produce a longer listing, one that does not replace $HOME with ~.

-p

Print the directory stack, one entry per line.

-v

Print the directory stack, one entry per line, with each entry preceded by its index in the stack.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required