$dirstack  –  Directory Stack

$dirstack contains the elements of the directory stack. It does not contain the current working directory, in contrast to the dirs builtin command.

Examples

Change working directory, print the directory stack, change back to the previous directory
1
2
3
4
cd ~
pushd /usr/bin
declare dirstack
popd
Output:
1
2
3
4
/usr/bin ~
dirstack=( /home/user )
~
/home/user
BashSupport Pro 是一款支持 dirstack** 的 **Zsh 集成开发环境 - 立即试用
© 2020–2025 Joachim Ansorg
声明
隐私政策
许可条款