1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-27 18:55:39 +02:00
tldr/pages/common/dirs.md
Pranaov S 8bc9dce9b1
pages/common/*: correct urls, see also improvements, unbashify pages, examples addition (#16841)
Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
2025-06-14 19:02:15 +03:00

34 lines
844 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.
> See also: `pushd`, `popd`.
> 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 a numbered list of entries in the directory stack:
`dirs -v`
- Display the directory stack without the tilde-prefix (`~`):
`dirs -l`
- Display only the `n`th entry in the directory stack, starting at 0 (Bash only):
`dirs +{{n}}`
- Display only the `n`th entry in the directory stack from the last, starting at 0 (Bash only):
`dirs -{{n}}`
- Clear the directory stack:
`dirs -c`