/usr/local/bin/ vs. /usr/bin/ for command line tools?

Greetings, foks!

from: Carsten Blüm’s (wonderful!) cliclick Read Me file:
Installation
Put cliclick anywhere you like. The best (i.e.: most common) place would probably be
/usr/local/bin

If I put cliclick into usr/local/bin/, then I have to use the path in a do shell script call:
do shell script “/usr/local/bin/cliclick -r d1412 846”
But if I put cliclick into /usr/bin/, then I don’t have to use the path in a do shell script call:
do shell script “cliclick -r d1412 846”

Is there a reason not to put command line tools into /usr/bin/?

Thanks!

Richard Fairbanks

Model: 2.33GHz MBPC2D
Browser: Google Chrome 7.0.517.41
Operating System: Mac OS X (10.6.4)

Hi,

/usr/bin is actually designated for system files, and /usr/local/bin for custom files.
Anyway it’s good programming habit to specify always the full path to an executable.

All relative paths are stored in /etc/paths.
If you add /usr/local/bin as a new line, you can omit it in shell script lines

Thank you (yet again), Stefan!

However:

All relative paths are stored in /etc/paths.
If you add /usr/local/bin as a new line, you can omit it in shell script lines

The line was already there. The full text of /private/etc/paths is:

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

Thoughts as to why then /usr/local/bin is necessary? It isn’t necessary in Terminal, but it is in AppleScript Editor.

Thanks!

I have no idea, that’s why I specify always the full path in do shell script lines