[lug] Idea for a new tutorial....maybe???

Hugh Brown hugh at math.byu.edu
Sat Apr 8 19:50:07 MDT 2000


A path is just where programs look for things (like libraries or other
programs) or where your shell looks for programs.

For instance, when you type `ls` at a shell prompt, your shell will go
through the listed path until it finds a program named ls.  When it
finds the program, the shell executes it.  If it doesn't find the
program, it will tell you "ls: command not found"

So on my machine my path is 

/bin:/usr/local/bin:/etc:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/java/bin:/usr/etc:/etc:/usr/bin:/usr/bin/X11:/usr/local/X11R6/bin:/usr/lib/X11/fonts:/usr/local/X11R6/include:/usr/local/rvplayer5.0:/opt/teTeX/bin:/usr/local/share/afterstep:/home/hugh/bin:/home/hugh/:/home/hugh/perl

and my shell finds ls in /bin and runs it.  If I had written a program
and named it ls and then put it in /home/hugh/bin and put /home/hugh/bin
ahead of /bin in the path then my version of ls would be run instead of
the system ls.

As far as the practice program for your fiancee, edit her .cshrc or
.tcshrc and append the path to the executable program to the existing
path variable.  If it isn't in there, add a line that says
set PATH=($PATH /new/path/to/practiceprogram)

Hugh


John Starkey wrote:
> 
> Damn you guys are quick. You and Jeff both.
> 
> There's a lot of info here. Thanks. ENV wasn't exactly what I was thinking
> it was but it's along the same lines. Kinda like setting up the desktop,
> but the shell.
> 
> What exactly is the PATH? It determines where the shell looks for the
> explanations of what you type, so it can pass that to the kernel????
> 
> I'm creating this database program for my fiance that will be customized
> for her field (pianist). It's called 'practice'. How would I put that in
> her path so that she can type in the name 'practice' and it opens the
> program.
> 
> And what did you mean by "forking a process". I use 'ps' a lot I know what
> a process is and how to determine parent/child and initd, etc. But how is
> a process created (ie, the forking)?
> 
> TIA,
> 
> John




More information about the LUG mailing list