home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!elroy.jpl.nasa.gov!news.claremont.edu!fenris!jwinstea
- From: jwinstea@fenris.claremont.edu (Jim Winstead Jr.)
- Subject: Re: Binary locations
- Message-ID: <1992Sep9.045457.5571@muddcs.claremont.edu>
- Sender: news@muddcs.claremont.edu (The News System)
- Organization: Harvey Mudd College, WIBSTR
- References: <y#sn22#.genie@netcom.com>
- Date: Wed, 9 Sep 1992 04:54:57 GMT
- Lines: 42
-
- In article <y#sn22#.genie@netcom.com> genie@netcom.com (The Genie) writes:
- >I've been using Linux for about 2 weeks now, and have found
- >a small nit-picky problem. When I compile something
- >or move a executable binary into a directory, Linux refuses
- >to recognize the existence of the binary unless
- >1) I source my .cshrc which includes paths
- >2) The new binary must be located in the binary path.
- >
- >Is there a way for Linux to automatically recognize binaries
- >and execute them in any directory besides those listed
- >in the path + to recognize a new binary when placed in
- >a directory (in essence, I have to source the .cshrc to
- >tell Linux to check all the paths for all binaries).
- >Isn't automatically recognizing binaries a normal feature
- >of SunOS, Ultrix, and Dynix? Or is there something I
- >must set correctly for this feature to work?
-
- Um, I think you've completely missed the point of the PATH variable
- and how executables are found by your shell.
-
- Executables will only be run by your shell if they are listed in one
- of the directories on your PATH, or if you specify a complete (or
- relative) pathname such as ./foo, or /usr/users/jwinstea/foo.
-
- Arbitrarily locating executables is not a misfeature of any operating
- system (or shell) that I've ever worked with or heard about in my
- reasonably varied experience.
-
- You don't need to source your .cshrc for your shell (*not* Linux) to
- recognize the executables in the directories in your path - the shell
- looks through the directories each time to find the program you
- specify (small caveat: most modern shells keep some sort of cache of
- previously-located executables).
-
- The Linux kernel will run any executable that the shell (or other
- programs) tells it to run. It is the job of the shell to search the
- PATH for the executables.
- --
- + Jim Winstead Jr. (CSci '95)
- | Harvey Mudd College, WIBSTR
- | jwinstea@jarthur.Claremont.EDU
- + or jwinstea@fenris.Claremont.EDU
-