tldr/pages/common/dirs.md

22 lines
545 B
Markdown
Raw Normal View History

# dirs
> Displays or manipulates the directory stack.
> The directory stack is a list of recently visited directories that can be manipulated with the `pushd` and `popd` commands.
2021-04-17 16:15:37 +01:00
> 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`