FAQ   Search   Memberlist  
Profile    Log in to check your private messages    Register    Log in
Directory Hierarchies

Post new topic   Reply to topic    BLAG Forum Index -> open discussion
View previous topic :: View next topic  
Author Message
PostPosted: Sat Jan 20, 2007 5:28 pm    Post subject: Directory Hierarchies Reply with quote

So, I know that I'm not a *nix guru, barely a programmer at all, and only 18, using Linux for about a year now, but every time I look at the directory hierarchies in Unix, I can't help but think that there's got to be a better way to arrange the directories. I'm not trying to shoot down Unix or anything, yet there just seems to be so many different places where links could probably be substituted for just having the required link already in the directory of the program that is calling it. I've only been wondering this awhile, but is there a better way to arrange them for more efficiency or something? (I also thought this would make good discussion material, too. Also, I understand that program code would have to be changed to look in the right places for what it needs to operate if everything was changed, this is only hypothetical.)
PostPosted: Sat Jan 20, 2007 6:42 pm    Post subject: Reply with quote

What directory structure do you think would be better? I am intrigued because I used to think the same for a couple of days until I realised I couldn't think of anything better.
PostPosted: Sat Jan 20, 2007 7:24 pm    Post subject: Reply with quote

Well, perhaps consolidate all of the bin directories into one, and just put flags on the names letting the OS know who can use what programs, for one. I was also thinking if /dev could be removed, since (to me at least) it doesn't make sense to have your /dev/hda, /dev/whatevers listed below the root directory, i.e. all of your partitions/drives exist below the root directory in some way. I'm not really sure I can think of anything better since I am not a computer scientist, but it just seems like there could be a more logical way to arrange things...
john maclean
PostPosted: Sun Jan 21, 2007 10:11 am    Post subject: Reply with quote

This may help...

/* start of extract */
man hier

HIER(7)                                          Linux Programmerís Manual                                         HIER(7)

       hier - Description of the file system hierarchy

       A typical Linux system has, among others, the following directories:

       /      This is the root directory.  This is where the whole tree starts.

       /bin   This  directory contains executable programs which are needed in single user mode and to bring the system up
              or repair it.

       /boot  Contains static files for the boot loader.  This directory only holds the files which are needed during  the
              boot process.  The map installer and configuration files should go to /sbin and /etc.

       /dev   Special or device files, which refer to physical devices.  See mknod(1).

       /dos   If both MS-DOS and Linux are run on one computer, this is a typical place to mount a DOS file system.

       /etc   Contains  configuration  files which are local to the machine.  Some larger software packages, like X11, can
              have their own subdirectories below /etc.  Site-wide configuration files may be placed here or in  /usr/etc.
              Nevertheless,  programs should always look for these files in /etc and you may have links for these files to

/* end of extract */

BLAG 'em up!
PostPosted: Sun Jan 21, 2007 2:40 pm    Post subject: Reply with quote

Check the "Linux Filesystem Standard" for more info too...
PostPosted: Mon Jan 22, 2007 12:19 am    Post subject: Reply with quote

A day or two ago I ran across http://www.gobolinux.org/ a distrobution that uses a own file structure but is still compatible with "the normal linux filestructure". I haven't really looked in to it yet so I haven't got a real opinion about it yet, but it is always intresting with new ways of doing things :)
PostPosted: Mon Jan 22, 2007 12:20 am    Post subject: Reply with quote

I found once I got used to the structure nothing else really came close. Whoever came up with the original way to structure things probably started off differently and now we end up with the finished result. I can't see a possible way to make the directories easier or more logical personally but that is just me.
PostPosted: Mon Jan 22, 2007 1:18 am    Post subject: Reply with quote

Ya, the logic may not seem evident at the beginning, but once you use it for awhile it starts to reveal itself. Just think, some of the most intelligent people of the 20th and 21st century have used and/or developed Unix systems. They didn't accidentally wind up with some broken structure. It's the way it is for a reason. ;)
PostPosted: Mon Jan 22, 2007 1:57 am    Post subject: Reply with quote

Yeah, I realize that Unix wasn't born yesterday, but I thought it would be a neat topic to discuss...
john maclean
PostPosted: Mon Jan 22, 2007 7:58 am    Post subject: Reply with quote

Pull out your network cable and add some users as root. You'll still be able to run
ssh username@localhost
for each user. They'll be able to have completely different configs once they've put them in thier respective ~/.thing files or directories. As long as you have the CPU and RAM they'll all run shells (and X if you allow it). Put your cable back in and they'll use the net as normal.

That was a "fall off my chair moment" for me first time I tried it.

BLAG 'em up!
Display posts from previous:   
Post new topic   Reply to topic    BLAG Forum Index -> open discussion
Page 1 of 1

Protected by Anti-Spam ACP