所有命令都是command not found

C、C++和Java语言
回复
chiefsailor
帖子: 11
注册时间: 2006-05-16 20:05
送出感谢: 0
接收感谢: 0

所有命令都是command not found

#1

帖子 chiefsailor » 2006-12-04 23:03

代码: 全选

chiefsailor@zht:/opt/apache-tomcat-5.5.17/bin$ dir
bootstrap.jar       commons-logging-api.jar  jmxaccessor-tasks.xml  shutdown.bat  tomcat5w.exe          version.bat
catalina.bat        cpappend.bat             jsvc.tar.gz            shutdown.sh   tomcat-juli.jar       version.sh
catalina.sh         digest.bat               service.bat            startup.bat   tomcat-native.tar.gz
catalina-tasks.xml  digest.sh                setclasspath.bat       startup.sh    tool-wrapper.bat
commons-daemon.jar  jkstatus-tasks.xml       setclasspath.sh        tomcat5.exe   tool-wrapper.sh
chiefsailor@zht:/opt/apache-tomcat-5.5.17/bin$ startup.sh
bash: startup.sh: command not found
chiefsailor@zht:/opt/apache-tomcat-5.5.17/bin$ sudo startup.sh
sudo: startup.sh: command not found
谢谢!
chiefsailor
帖子: 11
注册时间: 2006-05-16 20:05
送出感谢: 0
接收感谢: 0

#2

帖子 chiefsailor » 2006-12-05 14:20

命令前加上 ./
头像
zhuqin_83
帖子: 10606
注册时间: 2006-05-13 4:02
送出感谢: 0
接收感谢: 7 次
联系:

#3

帖子 zhuqin_83 » 2006-12-05 15:17

加bash 或 sh 或 ./
HP Pavilion DV6-2064CA: AMD Turion II Ultra Dual-Core Mobile M640, HD4650, 2GBx2 DDR2-800, Seagate 500GB 7200RPM SATA, BD-ROM
DELL UltraSharp 2209WA
Arch64, Testing repo
xiaolachang
帖子: 23
注册时间: 2006-12-11 7:25
送出感谢: 0
接收感谢: 0

#4

帖子 xiaolachang » 2006-12-11 9:09

.代表当前目录,如果执行程序或脚本没有加入环境变量PATH,在当前目录时前面要加"./"
回复

回到 “C/C++/Java”