方法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) |