On May 11, 2006, at 6:24 AM, Dennis Ballance wrote:

On #1, it's a security feature. It keeps your current directory from always inserting itself in the search path. If, for instance, you created a small text file called "rm", then tried to remove it by typing "rm rm", it would tell you "cannot execute rm" because, instead of looking in /usr/bin, it would try to run the local text file. You could add "." to your path if you wanted to, but you increase the likelihood of such a name collision problem.


--Dennis


If you do include . be sure to put it at the end of your path, like so

~:$ echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:/opt/local/bin:.


Also, the which command will tell you what you'll actually run

~:$ which rm
/bin/rm

(Note: this is OS X not Linux, so the path may not be appropriate to your system.)


Gregory Woodhouse
"Those who are enamored of practice
without theory are like a pilot who goes
into a ship without rudder or compass."
--Leonardo da Vinci (1452-1519)



Reply via email to