Chinaunix首页 | 论坛 | 博客
  • 博客访问: 700381
  • 博文数量: 108
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 1436
  • 用 户 组: 普通用户
  • 注册时间: 2012-10-31 09:49
文章分类
文章存档

2019年(16)

2015年(2)

2014年(20)

2013年(70)

我的朋友

分类: LINUX

2013-09-12 22:24:50

方法1、利用..(数字)来选择退回几集目录
例子1、:# cd /tmp/very/long/directory/structure/that/is/too/deep
        # ..4
        [Note: use ..4 to go up 4 directory level]
        # pwd
        /tmp/very/long/directory/structure/

方法2、利用..和...来回退,..表示退回上级目录,每多加一个.    就是多往上回退一级目录
例子2、alias ...="cd ../.."
            alias ....="cd ../../.."
            alias .....="cd ../../../.."
            alias ......="cd ../../../../.."
            # cd /tmp/very/long/directory/structure/that/is/too/deep
            # .....
            [Note: use ..... (five dots) to go up 4 directory level]
            # pwd
               /tmp/very/long/directory/structure/


方法3、和方法2类似
例子3、alias cd..="cd .."
alias cd...="cd ../.."
alias cd....="cd ../../.."
alias cd.....="cd ../../../.."
alias cd......="cd ../../../../.."
# cd /tmp/very/long/directory/structure/that/is/too/deep
# cd.....
[Note: use cd..... to go up 4 directory level]
# pwd
/tmp/very/long/directory/structure


阅读(2901) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~