1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-21 22:22:07 +02:00
tldr/pages/common/dirs.md
Lena 6fd816e36e
pages/*: use lowercase n for integer placeholders (#16033)
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2025-03-27 21:23:12 +05:30

544 B

dirs

Display or manipulate the directory stack. The directory stack is a list of recently visited directories that can be manipulated with the pushd and popd commands. More information: https://www.gnu.org/software/bash/manual/bash.html#Directory-Stack-Builtins.

  • Display the directory stack with a space between each entry:

dirs

  • Display the directory stack with one entry per line:

dirs -p

  • Display only the nth entry in the directory stack, starting at 0:

dirs +{{n}}

  • Clear the directory stack:

dirs -c