[英]Two different command with the same name
In OsX i've 2 programs installed in different path with the same terminal name "scmd". 在OsX中,我以相同的终端名称“ scmd”在不同的路径中安装了2个程序。 If I put the bin folder of each one into the global path, when I run a terminal and type "scmd" only the first founded will run, and I have no way to run the other.
如果将每个文件夹的bin文件夹放入全局路径,则在运行终端并键入“ scmd”时,只有第一个被创建的文件夹会运行,而我无法运行另一个文件夹。
So I need to change the name of the second executable, like "scmd2". 因此,我需要更改第二个可执行文件的名称,例如“ scmd2”。 In that way i can type "scmd" to run the first and "scmd2" to run the second.
这样,我可以键入“ scmd”运行第一个,并输入“ scmd2”运行第二个。
How can I do? 我能怎么做?
Thanks a lot, I hope I explained. 非常感谢,我希望我能解释一下。
Create an alias: 创建一个别名:
alias scmd2=/path/of/second/binary
To have it permanent, store it in your ~/.bashrc
file. 要使其永久存在,请将其存储在
~/.bashrc
文件中。
You can see all the paths for that binary with: 您可以使用以下命令查看该二进制文件的所有路径:
which scmd -a
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.