Chinaunix首页 | 论坛 | 博客
  • 博客访问: 277900
  • 博文数量: 91
  • 博客积分: 1772
  • 博客等级: 上尉
  • 技术积分: 930
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-17 19:49
文章分类

全部博文(91)

文章存档

2012年(1)

2011年(36)

2010年(50)

2008年(4)

我的朋友

分类: LINUX

2010-08-15 22:39:39


1. 掌握pushd,popd,dirs三个命令
2. pushd,dirs: 建立目录堆栈,显示堆栈中的目录。
hee@DELL:~$ dirs                  #---------- 查看目录堆栈
~                  #---------- 堆栈为空时显示当前目录
hee@DELL:~$ cd Undergoing/IgLab/source/
hee@DELL:~/Undergoing/IgLab/source$ pushd    #---------- 在堆栈中切换
bash: pushd: 没有其他的目录      #----------堆栈为空,故提示没有,并将当前目录推入堆栈
hee@DELL:~/Undergoing/IgLab/source$ dirs
~/Undergoing/IgLab/source
hee@DELL:~/Undergoing/IgLab/source$ pushd /usr    #----继续推入堆栈
/usr ~/Undergoing/IgLab/source        #--- 此时有两个目录
hee@DELL:/usr$ pushd            #--- 切换
~/Undergoing/IgLab/source /usr        
hee@DELL:~/Undergoing/IgLab/source$ dirs
~/Undergoing/IgLab/source /usr
hee@DELL:~/Undergoing/IgLab/source$ pushd
/usr ~/Undergoing/IgLab/source

3.删除堆栈目录 popd
hee@DELL:/usr$ dirs
/usr ~/Undergoing/IgLab/source
hee@DELL:/usr$ popd
~/Undergoing/IgLab/source
hee@DELL:~/Undergoing/IgLab/source$ popd
bash: popd: directory stack empty
阅读(1120) | 评论(0) | 转发(0) |
0

上一篇:Ubuntu nandsim

下一篇:Android NDK学习笔记

给主人留下些什么吧!~~