| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Linux and GCC |
-=> Neil Heller wrote to All <=-
NH> I just created hello_world.out with gcc. From the command line I typed
NH> hello_world and hello_world.out and got the same reply both times: No
NH> such function. How does one normally launch an executable application
NH> from the command line in *nix?
That's the way, but step back a bit. What happens when you type a filename
on the command line is that the shell searches the PATH to find it. That's
true in DOS/Windows/OS/2 as well as Unix. The difference is that in DOSish
systems, the current directory (".") is implicitly added to the path, and
searched first. In Unix, it's not -- _only_ the directories specified in
the PATH environment variable are searched for executables. You can
explicitly add the current directory to the PATH, if you want; but I don't
recommend that. Leaving it out is a security measure. (If you do add it, at
least put it at the _end_ of the PATH, instead of the beginning. That way,
globally-installed binaries are not overridden by same-named binaries in
the current directory.)
You can of course override the PATH searching by specifying a full pathname
explicitly, as you would in DOS. To run an executable from the current
directory, the simplest method is therefore:
./filename
That's the usual way for something that you're just testing, and haven't
yet installed somewhere in the PATH.
... Reality is that which, when you stop believing in it, doesn't go away.
--- MultiMail/Linux v0.44
* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)SEEN-BY: 633/267 270 @PATH: 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.