请教如何让linux gcc 编译后的文件 a.out 运行

用 linux redhat 8.0 所带的c语言编译器编译文件,自动产生a.out文件,属性已经是可执行文件, 且在当前目录下. 但每次输入a.out后提示不是可命令.请教个中高手如何解决.多谢!。

所有跟帖: 

chmod 755 a.out && ./a.out -Epimetheus- 给 Epimetheus 发送悄悄话 (0 bytes) () 12/10/2004 postreply 21:05:08

Thanks. what does && mean -新手3322- 给 新手3322 发送悄悄话 (0 bytes) () 12/10/2004 postreply 22:35:53

就是表示逻辑“与”,第一条命令执行成功后执行第二条 -Epimetheus- 给 Epimetheus 发送悄悄话 (0 bytes) () 12/11/2004 postreply 02:12:12

直接执行./a.out就行。 -不用去改属性- 给 不用去改属性 发送悄悄话 (0 bytes) () 12/11/2004 postreply 06:50:44

你的权限不够,可以通过获得root权限后再运行a.out -嫩头青- 给 嫩头青 发送悄悄话 嫩头青 的博客首页 (0 bytes) () 12/11/2004 postreply 10:25:11

请您先登陆,再发跟帖!