There are multiple binaries under /usr/local/util so I don't want to do it by running ln -s /bin/util_i /usr/local/util/util_i multiple times.

Anyway,what I want to achieve is that I don't need to type /usr/local/util/ to run binaries under it.

link|improve this question

13% accept rate
feedback

2 Answers

Don't copy into /bin if you can help it.

cp -sn /usr/local/util/* /usr/local/bin

But what you should be doing is adding /usr/local/util to $PATH.

link|improve this answer
How can I add /usr/local/util to $PATH in linux? – apache May 23 '10 at 2:58
Depends on the shell. For bash look in ~/.bash_profile or ~/.bashrc. – Ignacio Vazquez-Abrams May 23 '10 at 3:03
I modified .bash_profile this way but doesn't work: PATH=$PATH:$HOME/bin:/usr/local/subversion/bin.Do I need to run some command to notify bash to refresh the settings? – apache May 23 '10 at 3:09
~/.bash_profile is read when logging in. – Ignacio Vazquez-Abrams May 23 '10 at 3:13
Oh thanks!What's the difference of .bash_profile and .bashrc ? – apache May 23 '10 at 3:17
show 3 more comments
feedback

why not add this path to $PATH in /etc/profile

according to this link, the sequence of configuration files is

  • /etc/profile
  • ~/.bash_profile
  • ~/.bash_login
  • ~/.profile
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.