Re: "Program Files" folder

On 21 Apr 2011, at 10:59, Dov Grobgeld wrote:

There is no such thing as default folder under Linux/Unix. The user might want to install an application in 
her home directory, or in /opt, or in /usr/bin depending on permissions or the visibility of the 
application. Perhaps you meant to ask if it is possible to know where the application was run from? In that 
case just check argv[0].

Thanks Dov.  Strictly speaking of course, the same is true for Windows since there's nothing that inherently 
forces any user to install their files under "C:\Program Files".  It's just a common convention.  What I 
wanted to find out is if there are similar concepts on the other platforms.

In my Linux distro (64studio), /bin and /opt can only be written to by root - whereas /usr/bin and 
/usr/local/bin can be written to by anyone.  .usr/bin seems to contain what I'd loosely call "operating 
system programs", whereas /usr/local/bin seems to contain (again very loosely) programs that I've installed 
myself.  I was just wondering if that's a general convention?  Here's what the manual for automake says:-

" After everything has been built, and maybe tested, it is time to install it on the system. [...] The 
command make install will do that. However, by default everything will be installed in subdirectories of 
‘/usr/local’:  binaries will go into ‘/usr/local/bin’, libraries will end up in ‘/usr/local/lib’. "

I realise that automake is only one of several build systems but it seems to suggest that '/usr/local' is its 
default install location if nothing else was specified.

So I guess the question I'm asking is whether or not, by convention, /usr/local and /usr/local/bin will tend 
to have universal read, write and execute permissions.  They do in my distro but there are many other 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]