PATH is a colon-delimited list of directories your shell looks
for commands in. The kernel has a setting for a default PATH in
../linux/init/main.c, which then gets clobbered by the one in
/cenfigure/login.defs in a normal login sequence (which may not happen
on a vt in cLIeNUX if we use getvtsh), and then may otherwise be clobbered
or modified by /configure/profile or other shell init files. PATH is
a regular shell string-variable, and may be appended to with a prefix to
be searched first or a suffix to try last. If you want to have a directory
called "/blah" take precedence over /commands, you can do...
export PATH="/blah:"$PATH
and then do set to see if it's right. Note that we've included a
colon in the prefix in the example, and that $PATH is the value, or
contents, of PATH before this action is performed. That means that if you
do the above example twice, you will then have "/blah:/blah:" in
the front of $PATH, which is wasteful at best. You can also just reset
the whole string, but something like the above example is probably more
appropriate for scripts. Keep in mind that if you mess up PATH totally
you will have to give commands by thier full pathname, except for shell
built-ins, or cd to the directory that contains the command(s) you need.
cd is a built-in in most shells, for that reason.
cLIeNUX includes ".", which represents your current directory, in PATH by
default. This is often advised against, since it can contribute to root
exploits. This is only a factor if you run remote services that give a
non-root user file-creation and naming capability. Keep this in mind if
you do. Also keep in mind, when running a standard command with a copy in
the local directory... which takes precedence, the local one or the one
in the usual command directory? This can be bewildering.
I'm not clear on all the ramifications of the sequence of directories in
PATH, but you probably want the directories with the commands you use most
in the front for responsiveness.
The colon-delimited syntax of PATH is something of a de-facto standard.
Other list-of-directories variables usually observe this format.
RIGHTS
Copyright 1999 Richard Allen Hohensee
This file is released for redistribution only as part of an intact entire
cLIeNUX Core.