BLAG

BLAG Forums
It is currently Mon Dec 22, 2014 12:07 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Directory Hierarchies
PostPosted: Sat Jan 20, 2007 5:28 pm 
Offline

Joined: Sat Sep 02, 2006 12:22 am
Posts: 122
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.)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 20, 2007 6:42 pm 
Offline
Site Admin

Joined: Sun Mar 14, 2004 4:45 pm
Posts: 621
Location: London
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 20, 2007 7:24 pm 
Offline

Joined: Sat Sep 02, 2006 12:22 am
Posts: 122
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...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 21, 2007 10:11 am 
Offline
Site Admin

Joined: Wed Mar 17, 2004 6:17 pm
Posts: 1340
Location: London, UK
This may help...

/* start of extract */
Code:
man hier

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

NAME
       hier - Description of the file system hierarchy

DESCRIPTION
       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
              /usr/etc.

/* end of extract */

_________________
BLAG 'em up!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 21, 2007 2:40 pm 
Offline
Site Admin

Joined: Sun Mar 14, 2004 3:17 pm
Posts: 4492
Location: Loveland, Colorado, USA
Check the "Linux Filesystem Standard" for more info too...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 22, 2007 12:19 am 
Offline

Joined: Wed Jan 25, 2006 10:03 am
Posts: 8
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 :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 22, 2007 12:20 am 
Offline
Site Admin

Joined: Sun Mar 14, 2004 4:45 pm
Posts: 621
Location: London
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 22, 2007 1:18 am 
Offline
Site Admin

Joined: Sun Mar 14, 2004 3:17 pm
Posts: 4492
Location: Loveland, Colorado, USA
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. ;)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 22, 2007 1:57 am 
Offline

Joined: Sat Sep 02, 2006 12:22 am
Posts: 122
Yeah, I realize that Unix wasn't born yesterday, but I thought it would be a neat topic to discuss...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 22, 2007 7:58 am 
Offline
Site Admin

Joined: Wed Mar 17, 2004 6:17 pm
Posts: 1340
Location: London, UK
Pull out your network cable and add some users as root. You'll still be able to run
Code:
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group