I am missing something simple

I am missing something simple

Post by JL » Tue, 13 Oct 1998 04:00:00



Hey all!

The newbie got the complilers to work, even found the <stdio.h> header
in one of the redhat 5.1 rpm's.  I am able to compile a simple "hello
world" c source file but I cannot get it to execute (a.out).  I am
running the bash shell.  I change the permissions tochmos 777 a.out (rwx
to all groups), but when I try to run it, I get "bash: a.out unknown
command"

Can you help?  I think is is something so simple that it is under my
nose!

JL
remove the underlines and "nospam" to email

 
 
 

I am missing something simple

Post by Richard S. Lumpki » Tue, 13 Oct 1998 04:00:00



> Hey all!

> The newbie got the complilers to work, even found the <stdio.h> header
> in one of the redhat 5.1 rpm's.  I am able to compile a simple "hello
> world" c source file but I cannot get it to execute (a.out).  I am
> running the bash shell.  I change the permissions tochmos 777 a.out (rwx
> to all groups), but when I try to run it, I get "bash: a.out unknown
> command"

> Can you help?  I think is is something so simple that it is under my
> nose!

> JL
> remove the underlines and "nospam" to email

./a.out

------------------------------------------------------------------------
Richard S. Lumpkin, Ph.D.                            Associate Professor
Department of Chemistry                                     256-890-6365
University of Alabama in Huntsville                     fax 256-890-6349
Huntsville, AL 35899                          http://chromophore.uah.edu
------------------------------------------------------------------------


 
 
 

I am missing something simple

Post by Francis GALIEGU » Wed, 14 Oct 1998 04:00:00


Indeed, it's simple :)

./a.out should do the job for you :)

--
        fg

"Computers are like air conditioners - they stop working properly when
you open Windows"

 
 
 

I am missing something simple

Post by Mike Selder » Wed, 14 Oct 1998 04:00:00



> Hey all!

> The newbie got the complilers to work, even found the <stdio.h> header
> in one of the redhat 5.1 rpm's.  I am able to compile a simple "hello
> world" c source file but I cannot get it to execute (a.out).  I am
> running the bash shell.  I change the permissions tochmos 777 a.out (rwx
> to all groups), but when I try to run it, I get "bash: a.out unknown
> command"

> Can you help?  I think is is something so simple that it is under my
> nose!

> JL
> remove the underlines and "nospam" to email

Try ./a.out instead of a.out

-- Mike Selders, Network Administrator
______________________________________
Clark & Thompson Online Services, Inc.
        http://www.ctos.com

 
 
 

I am missing something simple

Post by JL » Wed, 14 Oct 1998 04:00:00


Thanks all for the tip!  One question though, most other executable files
don't need to use the ./ header to run an executable or am I wrong on this
also and still thinking in M$FT mode?

JL
remove underscores and nospam to email



> > Hey all!

> > The newbie got the complilers to work, even found the <stdio.h> header
> > in one of the redhat 5.1 rpm's.  I am able to compile a simple "hello
> > world" c source file but I cannot get it to execute (a.out).  I am
> > running the bash shell.  I change the permissions tochmos 777 a.out (rwx
> > to all groups), but when I try to run it, I get "bash: a.out unknown
> > command"

> > Can you help?  I think is is something so simple that it is under my
> > nose!

> > JL
> > remove the underlines and "nospam" to email

> Try ./a.out instead of a.out

> -- Mike Selders, Network Administrator
> ______________________________________
> Clark & Thompson Online Services, Inc.
>         http://www.ctos.com

 
 
 

I am missing something simple

Post by Richard S. Lumpki » Thu, 15 Oct 1998 04:00:00



> Thanks all for the tip!  One question though, most other executable files
> don't need to use the ./ header to run an executable or am I wrong on this
> also and still thinking in M$FT mode?

The directory you have a.out in is not in your $PATH, so the system
doesn't know what to do with the apparent command since it only looks
for commands in the directories that are in the $PATH.  The ./ says
execute the following command (a.out) that is in this directory.  That
is at least my interpretation, someone else may have a more accurate
description for you, if so let's hear it.

------------------------------------------------------------------------
Richard S. Lumpkin, Ph.D.                            Associate Professor
Department of Chemistry                                     256-890-6365
University of Alabama in Huntsville                     fax 256-890-6349
Huntsville, AL 35899                          http://chromophore.uah.edu
------------------------------------------------------------------------

 
 
 

I am missing something simple

Post by C Sanjayan Rosenmun » Thu, 15 Oct 1998 04:00:00



> Thanks all for the tip!  One question though, most other executable files
> don't need to use the ./ header to run an executable or am I wrong on this
> also and still thinking in M$FT mode?

> JL

I would *hope* that . is not in your path!  This would cause /severe/
security
problems. . . .

The other executables that you are able to run are also in directories
that
are listed in your path. . .

Hope this helps!
Sanjay

 
 
 

I am missing something simple

Post by Mike Selder » Thu, 15 Oct 1998 04:00:00



> Thanks all for the tip!  One question though, most other executable files
> don't need to use the ./ header to run an executable or am I wrong on this
> also and still thinking in M$FT mode?

The difference here is that DOS (or Windows for that matter) includes the
present working directory in the paths that get searched for commands.  Linux
doesn't do this, but you have a few options.

1)  Edit the file .bash_profile in your home directory to include directories
in your search path.
2)  Copy, move, or symbolic link your new executable into a directory that is
already in your search path.
3)  Preface the command with ./ anytime you want to execute something from the
present working directory.
4)  Use the absolute path to your executable.  ie:
/home/user/work/newfile/a.out

By "most other executables" I am guessing that you mean those that your system
installed as part of your distribution.  Things like ls & df are found in /bin,
while gcc & the like are found in /usr/bin.  Take a peek at that .bash_profile
and I think you'll find that /bin & /usr/bin are already part of your search
path, which is why you don't need to preface them with ./ or any such thing.

I like to create a bin in my home directory for simple scripts or executables
I've created or installed  just to try out.

Hope this helps.

-- Mike Selders, Network Administrator
______________________________________
Clark & Thompson Online Services, Inc.
        http://www.ctos.com

 
 
 

1. Am I missing something with the 5.0 ISO images?

1) There is a mini install image thats about 200MB which I guess is
the minimum you need to get a working system.

2) There is the full install thats about 800MB so split over two
disks, 1st is 600MB second is 200MB

I can't find a definitive readme explaining whats the difference
between these two installs.

Question - why not just make one set of disk the fist being 200MB and
is the mini-instal and the second being 600MB with everything else on
it.

OK, I know all the 'other packages are missing' but as the site says
these can be downloaded after installing the system.

2. Invoking RPC server with inetd?

3. Bug in cardbus initialization, or am I missing something?

4. please help! - probably a simple permissions problem with audio CDs..

5. Am I missing something or does Netscape's NEWS reader suck?

6. kernel: bad partition table, but it works fine

7. date/time, Am I missing something?

8. Setting up DNS for my Domain

9. Xconfigurator-am I missing something?

10. Am I Missing Something???

11. named configuration - am I missing something obvious ?

12. Am I missing something?