1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-23 17:24: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

21 lines
544 B
Markdown

# 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 `n`th entry in the directory stack, starting at 0:
`dirs +{{n}}`
- Clear the directory stack:
`dirs -c`