Should /opt/csw/bin be first or last in $PATH?

When setting my PATH, should I put /opt/csw/bin first or last? Does it make any difference?

asked: 2012-02-06 by: automaciej


pfelecan answers:

Putting /opt/csw/bin at the beginning of the PATH gives precedence to the OpenCSW installed binaries when the operating system supplier provides the same binaries. Putting it at the end gives precedence to those binaries provided by the OS supplier.

For the super user, I put also, with the same precedence, the /opt/csw/sbin in the PATH environment variable.

When using binaries in specially rooted packages, as for apache or gcc3, the binaries containing directories follow the same position, e.g. /opt/csw/bin:/opt/csw/gcc3/bin.

Sometimes, the /opt/csw/gnu directory is useful when wishing to use the canonical names for GNU user land, e.g. find instead of gfind.