Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Preferred location for binary, Does it matter or ..< Next Oldest | Next Newest >
WoofyDugfock Offline





Group: Members
Posts: 146
Joined: Sep. 2004
Posted: Mar. 22 2005,08:20 QUOTE

I can place the binary for an extension I'm making anywhere provided the directory is in the command path.

Is there a preferred location in terms of conforming with linux standards? Does it matter whether it is put in /usr/local/bin or /usr/bin?  I'm wondering what they mean by "local" anyway (as in "locally installed software" - everything that's not a base install?)  Looking at the location of binaries from a few dsl's, they seem to be all over the place.

(I take it you wouldn't usually put it in /bin).


--------------
"We don't need no stinkin' Windows"

http://news.zdnet.co.uk/software/linuxunix/0,39020390,39149796,00.htm
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Mar. 22 2005,14:59 QUOTE

Technically it doesn't really matter as far as the enduser is concerned, but typically installed apps are put into /usr/local or /opt so that system updates don't mess with them.  You can actually put binaries anywhere you want, even if it's not in your path.  It's just more convenient and organized to follow the standard hierarchy.
http://www.pathname.com/fhs/


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
WoofyDugfock Offline





Group: Members
Posts: 146
Joined: Sep. 2004
Posted: Mar. 22 2005,15:10 QUOTE

Thx - some late night reading some time.

(The binary per se needed to be in the command path in this case  because it's a commandline app).


--------------
"We don't need no stinkin' Windows"

http://news.zdnet.co.uk/software/linuxunix/0,39020390,39149796,00.htm
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Mar. 22 2005,15:48 QUOTE

It's always most convenient to put executables into /usr/bin or /usr/local/bin, but if it is not possible for some reason (for example, if you create a tar.gz or uci extension), there are a few things you can do to work around it:

1) use the full path to the executable:
/opt/something/bin/executable
2) add the directory to your $PATH variable:
PATH="/opt/something/bin:$PATH"
3) create a symlink to the file in a directory which is already in your path.

I often do a combination of the 2nd and 3rd options.  I have a bin directory in $HOME, which is added to my path.  If there are executables not in my path I link them into that bin directory.
This saves having a great long string for $PATH


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
3 replies since Mar. 22 2005,08:20 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: Preferred location for binary

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code