1. Edit your profile
vi ~/.bashrc
add below lines:
#shortcuts of my deep directorys
alias openwrt="cd /home/ubuntu/downloads.openwrt.org/chaos_calmer/15.05/ar71xx/nand/packages"
alias cd.2="cd ../.."
alias cd.3="cd ../../.."
alias cd.4="cd ../../../.."
alias cd.5="cd ../../../../.."
alias cd.6="cd ../../../../../.."
alias cd.7="cd ../../../../../../.."
2. Make it take effect immediately.
source ~/.bashrc
3. Test
- type
openwrt
at anywhere, you can enter to /home/ubuntu/downloads.openwrt.org/chaos_calmer/15.05/ar71xx/nand/packages - type
cd.6
or cd.x to go back to the upper directory to x level. (pls replace x by number)
No comments:
Post a Comment