Command not found

て烟熏妆下的殇ゞ 提交于 2019-12-12 02:16:21

问题


I am quite new to the Mac Terminal environment. I donwloaded sqlplus (which is recognised as a UNIX executable program) and then in Terminal I do cd a few times until I arrive in the folder I put this in (\Applications\instantclient_10) in this case. When I type 'ls' I see a listing of all the files including the sqlplus. So I would then expect to simply type at the Telnet prompt 'sqlplus' and then this would start but instead keep getting

-bash: sqlplus: command not found

This is problem one.

I have now downloaded MySQL and again, when I go to the correct folder (\Library\StarupItems\MySQLCOM) and I type 'ls' I see my files (including MySQLCOM) but when I come to try to 'run' this by simply typing 'MySQLCOM' again the message is:

-base: MySQLCOM: command not found

What am I doing wrong? Thanks


回答1:


To run binary/executables in current folder you need to prefix them with ./

./sqlplus

The idea here is that you want to force execution of local file and not run it accidentally. Imagine app that would put ls binary into it's folder and it would automatically run if did ls in that folder.



来源:https://stackoverflow.com/questions/12555578/command-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!