home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / linux / 10242 < prev    next >
Encoding:
Text File  |  1992-09-08  |  2.4 KB  |  54 lines

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