首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

在Linux上运用pushd的一些尝试

2012-06-27 
在Linux上使用pushd的一些尝试Linux上使用pushd的时候,遇到了奇怪的问题,当我在/root/test folder下创建了

在Linux上使用pushd的一些尝试

Linux上使用pushd的时候,遇到了奇怪的问题,当我在/root/test folder下创建了tmp1,tmp2,tmp3 三个文件夹

root@computer:~/test# dirs~/testroot@computer:~/test# pushd -n ./tmp1~/test ./tmp1root@computer:~/test# pushd -n ./tmp2~/test ./tmp2 ./tmp1root@computer:~/test# pushd -n ./tmp3~/test ./tmp3 ./tmp2 ./tmp1root@computer:~/test# dirs -v 0  ~/test 1  ./tmp3 2  ./tmp2 3  ./tmp1

?在这里,-n参数只将其后的参数即目录压入到栈中,但是并不切换目录,当前目录始终是test目录。

热点排行