Op 12-mrt-2007, om 21:52 heeft Ryan Schmidt het volgende geschreven:

On Mar 10, 2007, at 06:26, Elise van Looij wrote:


PATH=/opt/local/lib/mysql5/bin/mysql:/opt/local/bin/mysql5:/usr/local/mysql/bin:/bin:/sbin:/usr/bin:/usr/sbin:/opt/local/bin:/opt/local/lib/mysql5/bin/mysqladmin:/opt/local/lib/mysql5/bin/mysql


My understanding of PATH is that it defines directories in which binaries are looked for. Therefore "/opt/local/lib/mysql5/bin/mysql" is useless since that is a file, not a directory. Same goes for "/opt/local/lib/mysql5/bin/mysqladmin" and the second "/opt/local/lib/mysql5/bin/mysql".


I personally prefer to place the /opt directories before the system's /usr and /bin directories in the path, so that if I install newer versions of something using MacPorts which the OS already provided older versions of, the new versions get used when I ask for them, not the old ones.


My path, for your info and for comparison, is "/Users/rschmidt/bin:/opt/local/bin:/opt/local/sbin:/opt/local/lib/mysql5/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin".


I hope you'll permit another stupid question. I can only find instructions on how to add to my existing path, but not how to replace it (my 3rd edition of Unix for Dummies, though usually excellent at this kind of thing, falls short here). Should I type into my Terminal:

sudo pico ~/.profile

and then 

PATH=/Users/elisevanlooij/bin:/opt/local/bin:/opt/local/sbin:/opt/local/lib/mysql5/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin

?


Elise van Looij