Re: basic info on the directory structure


Subject: Re: basic info on the directory structure
From: ScottP (parrisc@mindspring.com)
Date: Fri Jun 16 2000 - 14:34:14 MDT


> i found some information at
> http://www.linux-mandrake.com/userguide/en/reference/013.html
>

As I said in my first response. Each distribution of linux (i.e mandrake
vs Yellowdog) may have slightly different directory trees.
 
> but have a couple of ? from what i learned
>
> what is /opt, are these share accross all users and if so, isn't the same
> has having the files in the /usr/bin
>

/opt must be a mandrake thing.....I have used Linux Universe, RedHat and
yellowdog and I dont have an /opt... Used to use a SGI (IRIX 5.2)
a while back...I dont recall if it used /opt but I dont think so.

 
> there was no reference to /usr/sbin, what is this directory for

System programs non essential to booting. Mostly daemons. BTW,
the reason you have /bin and /sbin is that these programs are
essential for booting and very basic use. This is so you can
try and fix something if you cant mount /usr.

>
> what is /usr/local, the doc didn't make that clear. my assumtion when they
> say programs you install your self means that each user would have there own
> directory in this directory for own software which would be shared amoung
> all users ect /usr/local/wayne

/usr/local is unused on my YDL, tho it is there. I dont see any reason
you couldnt use it but most of the rpm's and source "install's" install
to other places (mainly /usr/bin) /usr/local is supposed to contain
programs that the sysadmin (you) install that are not part of the
distribution. So say you download an ICQ client... you might
put it in /usr/local/bin instead of /usr/bin. /usr/local is not for
users to install programs but for the sysadmin to add new programs.
You wouldnt have a situation where you wanted a /usr/local/wayne.

> if my assumtion of it not being share amoung all users, then isn't this the
> same as putting it in the /home/wayne/myprogs

No

You might think of /usr/local as a way of keeping a tidy house where
you put programs you add to your system so that you can keep track
of what came on your CD and what you added later.

BTW, I'm not sure you would want to clutter up /home/wayne with lots
of big software packages. When I mentioned having executables in
the /home tree earlier I was really talking about scripts and
small apps that you would have for your own personal use, maybe
your "hello, world" C program or a small app that you wrote to
download the entire contents of a website to your drive so you can browse
it offline...I wasnt talking about something like sticking StarOffice
in /home/wayne/myprogs.

I think you are missing an important point here. While it does matter where
software gets installed, the paths are the most important thing. If
you do a normal install of a compiled program (using rpm or install)
then you dont worry about the paths, it's handled for you. If you start
placing things in wierd spots (i.e. you create /opt/bin) you may need to
revise paths for the program's benefit (the program will expect to find
certain files in certain places and you will have to tell it where to look)
and you may need to revise your own search paths (so you dont have to
type % /opt/bin/MyTetris to get MyTetris to run).

As you might have susupected its much easier to let the program install
where it wants to by using rpm's and the "install" feature that comes
with most source packages. If you cant do either of those, /usr/bin
is the most likely place to stick something.

To complicate matters you will also find many directories mirrored in
other places via links. This is because some programs expect to find
the files in those directories in one place and other programs
expect to find them in another, this avoids the need for 2 copies
of those files.

Scott



This archive was generated by hypermail 2a24 : Fri Jun 16 2000 - 14:36:24 MDT