Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

location for executables

Status
Not open for further replies.

henderj99

Programmer
Nov 11, 2002
4
0
0
US
in order to get my executable script to run without entering the full path, do i need to move it to /bin?
 
You will need to add the path to the environment via your profile.
 
hender,

/usr/local/bin is probably more appropriate for your script

alternatively - comtec's suggestion will work. Put the script in a custom directory somewhere and add that directory to your PATH variable.

Mike

"Deliver me from the bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
echo $PATH shows you where the shell will look for executables
 
i don't like to install programs in system-dirs like /usr.
/usr/local is a gnu-invention, sure not standard. you need
root permission to work in /usr.

for commodity, you can create a symlink:
# once, as root
mkdir -p /what/ever/you/want/local/bin
cd /usr
ln -s ../what/ever/you/want/local
# you must own /what/ever/you/want
chown -R your-id:your-grp /what/ever/you/want
# as normal-user
mv the-prog /what/ever/you/want/local/bin

-now your prog is known by the PATH (/usr/local/bin).
-all gnu-programs will find this directory.
-no need of root perms.
-think also a little about backup/restore questions,
it's sure more confortable to work on /what/ever/you/want
as on /usr.

don't forget, RTFMP :) guggach
 
/usr/local/bin not standard - really?

Mike

"Deliver me from the bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
yes mike
you never will find a (native) /usr/local
on solaris, i already readed your next post:
solaris is (maybe) NOT standard.
and, did you read about root perms? + backup?

don't forget, RTFMP :) guggach
 
/usr/local/bin is standard install location on all HPUX 10.20 and higher. As well as, on IBM - AIX 4.3 and higher.
It is the prefered location for scripts created by users and programmers.
 

since 1994 is /usr no longer a users-directory
i remember /usr/acct/abc (in at&t v7), now is called
{/export}/home/abc
btw: do you understand the {} syntax ?
/usr is reserved for the SYSTEM-USER
normally is /usr on /, mostly(+normally) a small
partition, NOBODY should write here
if /usr is on a own partition, see for an admin
training, it's interessant, what happened in the
last 10 years.
you ever get probls with perms, space, bup...
vfc

don't forget, RTFMP :) guggach
 
I put scripts into /usr/local/bin that I don't want developers to be able to change - local sys-admin scripts and executables like perl.

Yes. /usr/local/bin gets blown away if you have to reinstall for some reason. But mostly that's because of a disaster - when I use ignite to restore the machine, which looks after the customised contents of /usr/local/bin.

Mike

"Deliver me from the bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top