Name

popd

Synopsis

popd [-n] [+count] [-count]

Pop the top directory off the directory stack (as shown by the dirs command), and change to the new top directory, or manage the directory stack.

Options

-n

Don’t change to the new top directory; just manipulate the stack.

+count

Remove the item count entries from the left, as shown by dirs. Counting starts at zero. No directory change occurs.

-count

Remove the item count entries from the right, as shown by dirs. Counting starts at zero. No directory change occurs.

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.