Switching to an aliased directory
Just wanted to know if it is possible to switch to an aliased directory using sh开发者_开发百科ell script.
To switch to a directory there is cd command. But i have aliased the directory and wanted to know as how to switch to the aliased directory.
Could someone please help me?
An alias is meant to be a shortcut for a command.
You can't cd
to an aliased directory.
But if you have a variable referencing that directory, you can. e.g.
dev="/path/to/my/dev"
cd $dev
Or set up an alias to cd to the directory:
alias dev='cd /path/to/my/dev'
精彩评论