Liste des Groupes | Revenir à cu programmer |
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:>
Essentially there were two questions I had that I can reformulate in a
more compact form as
>
"Why, in the first place, are all these path components
part of the default PATH for ordinary users? - Is there
any [functional] rationale or necessity for that?"
Fundamentally, it's an implementation choice. For example,
the Fedora root user will have
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
as the PATH variable.
Novice users likely never change from the default path,
and one hopes (absent duplicate command names) that the
PATH variable places the most likely elements towards
the front of the list.
For korn shell, it will remember the element on a hit
and subsequent invocations of the command will get
a hit in the shell cache and will not search PATH.
If one has a custom command that clashes with one in the
distribution, one can simply include that directory in the
path before the rest (e.g. /usr/local/sbin above), but I
wouldn't expect to find that most general linux users
ever touch PATH.
[ NFS snipped ]
>
"_If_ many of the default PATH components are unnecessary,
where and how to best reduce these settings to a sensible
subset? - Without spoiling the system, of course."
Iteratively remove elements. If things don't work, put them back.
Les messages affichés proviennent d'usenet.