How can I determine which paths are required? I am using Mac OS X Snow Leopard 10.6.8.

My Mac has several volumes with OS X and each volume has several users.

I wish to minimise the work required to ensure that my paths are adequate both for the installed OS and subsequent non-Apple additions by updating /private/etc/paths.

Is there a way to determine where executables requiring a path reside or should reside?

Is it practical to move items to a directory in the path?

My /private/etc/paths contains:

/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin


echo $PATH produces:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin


However the above are not adequate for some applications.

A search for directories named sbin produces many hits including:

/usr/local/sbin


Should the various share directories be in the path?

Searching for directories containing executables with the following find command produces over 8,000 hits and is clearly not a viable approach.

find / -perm +0111 -type d
When you login to your computer the loginwindow.app creates environment with the PATH variable set to:

/usr/bin:/bin:/usr/sbin:/sbin


This PATH is available to all applications that you start. When you start the Terminal.app this PATH is inherited by your shell which is started as a login shell. The PATH is then processed by the path_helper application to produce the PATH:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin


The system is designed for an application package or an administrator to add paths by creating text files with adsolute paths in the directory /private/etc/paths.d. You may find other executables located in

/private/etc
/usr/lib
/usr/libexec
/usr/local # should have the same hierarchy as /usr
/opt
/opt/local # macports package manager
/sw # fink package manager
/System
/Library


Tools may also be found in bundles and frameworks.

/Applications/LibreOffice.app/Contents/MacOS # the path to run open office headless
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources # the path to the commandline airport utility 


There are no set rules and an administrator could design his/her own prefix to install software. 

The goal of an administrator is to set the global path as small as possible then expand the path as needed according to a user's privileges, in their own startup files.