即使在我的路上,Bash仍未找到程序
我在路上有一个程序。使用指定的完整路径执行时,程序将运行。但是当我仅使用其名称运行该程序时,找不到该程序。 本质上,我想了解以下输出是如何实现的,以及如何解决该问题,以便在没有指定完整路径的情况下可以实际找到我的程序: root:/usr/local/bin# ./siege **************************************************** siege: could not open /usr/local/bin/etc/siegerc run 'siege.config' to generate a new .siegerc file **************************************************** root:/usr/local/bin# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games root:/usr/local/bin# siege bash: /usr/bin/siege: No such file or directory root:/usr/local/bin# wtf!?!? 我在使用bash的Ubuntu 12.04上。另外请注意,由于此问题的目的,围困的警告输出并不重要,因为我仅对是否可以找到并调用该程序感兴趣。