You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

548 B

popd

说明

popd命令 用于删除目录栈中的记录如果popd命令不加任何参数则会先删除目录栈最上面的记录然后切换到删除过后的目录栈中的最上面的目录

+N  将第N个目录删除从左边数起数字从0开始
-N  将第N个目录删除从右边数起数字从0开始
-n  将目录出栈时,不切换目录

实例

# 当前目录/tmp/dir4
popd +1 # 输出:/tmp/dir4 /tmp/dir2 /tmp/dir1 ~
popd -2 # 输出:/tmp/dir4 /tmp/dir1 ~