Bill Jonas on Wed, 8 May 2002 22:23:11 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] OT: learn perl


On Wed, May 08, 2002 at 08:01:44PM -0400, Fred K Ollinger wrote:
> PATH=$PATH:.
> export PATH

Note that it's a bad idea to put . in your path, especially if you have
more than one user on your system.  If you do it, it *is* better to put
it at the end, though, like you have it.

For those that don't know, the reason for this is simple: Suppose
someone puts an executable named 'ls' in some directory.  Then it's just
a matter of getting root to cd into that directory and take a look.
Granted, with the current directory at the end, it gets a little
trickier; perhaps the executable would be named 'sl' instead, a common
typo.  (See the Debian sl package for instance.)

> PATH=$PATH:~/bin
> export PATH

Yes, much better.  That's what I do, myself.  For one-offs and the like,
I still prefix the executable name with './', and deposit executables I
want to keep in ~/bin.  One caution, though; make sure that this
directory is only writable by yourself, for the same reasons as above.

-- 
Bill Jonas    *    bill@billjonas.com    *    http://www.billjonas.com/
"They that can give up  essential  liberty to obtain a little temporary
safety deserve neither liberty nor safety."        -- Benjamin Franklin

Attachment: pgp7YO4ZqCuxF.pgp
Description: PGP signature