Redian新闻
>
Why do I always need to type ./ to run a command?
avatar
Why do I always need to type ./ to run a command?# Unix - 噫吁兮,危乎高哉
m*f
1
I use Solaris 8.
I always have to type ./commandname in the current directory. I
don't like it. Actually, in the path settings for both the SU
and ordinary users, I have the dot (".") like this: /usr/bin:/usr/sbin:.
Then why? Can you guys explain please? And how should I attack
this problem?
avatar
z*x
2
Maybe you can change it to "/usr/bin:/usr/sbin/:./"
the shell will explain the command to ./yourcommand.
if not, the shell will get ".yourcommand" I guess.

【在 m****f 的大作中提到】
: I use Solaris 8.
: I always have to type ./commandname in the current directory. I
: don't like it. Actually, in the path settings for both the SU
: and ordinary users, I have the dot (".") like this: /usr/bin:/usr/sbin:.
: Then why? Can you guys explain please? And how should I attack
: this problem?

avatar
X*r
3
ft, I don't think any shell would do such stupid things.
for myself, which shell are you using? maybe you can let us see
$PATH or $path ?

【在 z****x 的大作中提到】
: Maybe you can change it to "/usr/bin:/usr/sbin/:./"
: the shell will explain the command to ./yourcommand.
: if not, the shell will get ".yourcommand" I guess.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。