Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
pushd我有一个使用and遍历目录树的脚本popd。它在一个名为-. 我试过了:
pushd
popd
-
pushd -- -
但是破折号仍然被解释为一个选项(并且前一个目录被压入堆栈)。我有同样的问题cd。
cd
在不同的风格中,这是一个面试问题。(如何删除名为“-”的文件?)
$ cd ./- $ pushd ./- $ pushd ./$next $ pushd $PWD/- # Yay JL $ pushd /what/ever/-