On Tue, 14 Feb 2017 08:40:25 +0000, Theo wrote:
> Martin Gregorie wrote:
>> should be included in $PATH by default and all properly written
>> programs should search for configuration files etc. by looking in
>>
>> .:/usr/local/bin:/usr/bin
>>
>> in that order.
>
> Point of order: it's generally not a good idea to have '.' on your path,
> because then you risk your system tools being clobbered by ones in the
> current directory.
>
Agreed - if its at the front of the $PATH list. OTOH I see nothing wrong
with *appending* :~/bin:. to $PATH. Been doing it for years with no bad
effects.
> Prefix program names with './' if you want to run ones in the current
> directory.
>
Yes, if you're using sudo execution, because $PATH as defined in your
user profile is pushed aside in the sudo environment.
However, you probably saw my later correction and now know that I meant
to write ".:/usr/local/etc:/etc" because I was talking about my preferred
search order when looking for configuration files.
The reason for this preference is because it allows a site configuration
in /usr/local/etc to override a default configuration in /etc while
allowing any site-specific configuration to be overridden by a locally
declared one in the current directory. This can be very useful during
program development because it lets the special testing configuration(s)
override the normal configuration.
--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|