开发者

Switching to an aliased directory

开发者 https://www.devze.com 2023-01-21 06:02 出处:网络
Just wanted to know if it is possible to switch to an aliased directory using sh开发者_开发百科ell script.

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

精彩评论

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

关注公众号