开发者

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'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜