Article View: ahn.tech.linux
Article #1037Re: can't execute a.out....
From: nordi
Date: Tue, 09 Jan 2001 16:11
Date: Tue, 09 Jan 2001 16:11
22 lines
1784 bytes
1784 bytes
JJ wrote:
>
> I installed RedHat Linux 6.2 recently. When compiled and tried to execute a
> simple C program, I got the following error - "bash: a.out: command not
> found."
>
> I compiled my HelloWorld program using gcc as follows: gcc simple.c (no
> erros were reported)
> Then, I checked a.out attributes, they were -rwxr-xr-x.
^^^^^^^^^^^^^^^^^
>
> What can be wrong? Why doesn't it execute?
I assume that your program is called "a.out". If you
use your system as root user (which you shouldn't)
then you have to add a "./" to execute a program in
the current directory. That's for security reasons.
Just try the command "./mylittleprogram" to start
"mylittleprogram" and maybe it'll work.
nordi
Technical Details
Message-ID:
<3A5B383F.3608F626@addcom.de>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!nntp1.njy.teleglobe.net!teleglobe.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!news0.de.colt.net!riker.addcom.de!not-for-mailReferences:
<93e1at$mrc$1@slb0.atl.mindspring.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11033e,3dccba4cdc941ea6 X-Google-Attributes: gid11033e,public X-Google-ArrivalTime: 2001-01-09 08:20:06 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!nntp1.njy.teleglobe.net!teleglobe.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!news0.de.colt.net!riker.addcom.de!not-for-mail From: nordi <nordi@addcom.de> Newsgroups: ahn.tech.linux Subject: Re: can't execute a.out.... Date: Tue, 09 Jan 2001 17:11:43 +0100 Organization: AddCom AG Lines: 22 Message-ID: <3A5B383F.3608F626@addcom.de> References: <93e1at$mrc$1@slb0.atl.mindspring.net> NNTP-Posting-Host: f-dialin-197.addcom.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: riker.addcom.de 979056697 28679 62.96.139.205 (9 Jan 2001 16:11:37 GMT) X-Complaints-To: news@news.addcom.de NNTP-Posting-Date: 9 Jan 2001 16:11:37 GMT X-Mailer: Mozilla 4.75 [de] (X11; U; Linux 2.2.16 i586) X-Accept-Language: en, de