About
Community
News of the Temple
Community Bulletin Board
Chat
Art
Carnality
Entertainment
Science
Society
Technology
bbs | search | rss | faq | about | register
digg | del.icio.us | sphere | google

Go Back   Community > Technology > Everything *NIX

Everything *NIX This is a general forum about all forms of *nix. Post your ideas and thoughts on this wonderful OS family. Talk about your personal favorite flavor of *nix and why you think it's so much better than the others. Anything pertaining to *nix and *nix administration should be posted here.

Reply
 
Thread Tools Display Modes
  #1   Add Issue313 to your ignore list  
Old 2008-10-27, 01:50
Issue313 Issue313 is offline
Regular
 
Land of the Ires.
Default What's up with the lunix filesystem?

Unix generally has loads of different folders in the base directory with nonsensical names like opt, var, bin, usr etc. Each of those is further subdivided, into things like opt, etc, local, share, etc.

This probably made sense when a disk held 12 different programs, but isn't it about time we simplified the unix filesystem. I haven't counted the number of different folders on a unix distro, but it's something like 20 trillion. WTF?
Reply With Quote
  #2   Add zeusy to your ignore list  
Old 2008-10-27, 03:25
zeusy zeusy is offline
Regular
 
Default Re: What's up with the lunix filesystem?

Quote:
Originally Posted by Issue313 View Post
Unix generally has loads of different folders in the base directory with nonsensical names like opt, var, bin, usr etc. Each of those is further subdivided, into things like opt, etc, local, share, etc.

This probably made sense when a disk held 12 different programs, but isn't it about time we simplified the unix filesystem. I haven't counted the number of different folders on a unix distro, but it's something like 20 trillion. WTF?
`man hier`
Everything in / belongs to the system except /usr and /home (/home is sometimes a symlink to /usr/home).
It's that simple, everything you need is either in /usr or /home, you shouldnt touch the rest.

Some (in my opinion stupid) Unix-like OS uses the /opt directory for KDE.

You'll sometimes need to look at files in /usr/share/doc.
/usr/ports is where the ports tree is usually installed by default in FreeBSD.

Sometimes, you'll have to tweak configuration files in /etc, most ditro provides graphical tools that will do it for you.

In other words, forget about the filesystem, use /home/$USER to place your files.
If you want more information see the hier man page.
Reply With Quote
  #3   Add deus-redux to your ignore list  
Old 2008-10-27, 10:15
deus-redux deus-redux is offline
Moderator
 
Great Britain Send a message via AIM to deus-redux Send a message via MSN to deus-redux
Arrow Re: What's up with the lunix filesystem?

All the directories exist for a reason - however, the system can be confusing for new users and leave them thinking "WTF, why does that go there?".

I do think there is some simplification that can be done, however doing so would really require a quite major overhaul...

-deus-
__________________
My Blog (PHP, AJAX, etc)
Email Me
Reply With Quote
  #4   Add RAOVQ to your ignore list  
Old 2008-10-27, 13:31
RAOVQ RAOVQ is offline
Regular
 
the happy land of australia
Default Re: What's up with the lunix filesystem?

To save re-inventing the wheel, shamelessly stolen from http://www.freeos.com/articles/3102/:

/sbin - This directory contains all the binaries that are essential to the working of the system. These include system administration as well as maintenance and hardware configuration programs. Find lilo, fdisk, init, ifconfig etc here. These are the essential programs that are required by all the users. Another directory that contains system binaries is /usr/sbin. This directory contains other binaries of use to the system administrator. This is where you will find the network daemons for your system along with other binaries that only the system administrator has access to, but which are not required for system maintenance, repair etc.

/bin - In contrast to /sbin, the bin directory contains several useful commands that are used by both the system administrator as well as non-privileged users. This directory usually contains the shells like bash, csh etc. as well as much used commands like cp, mv, rm, cat, ls. There also is /usr/bin, which contains other user binaries. These binaries on the other hand are not essential for the user. The binaries in /bin however, a user cannot do without.

/boot - This directory contains the system.map file as well as the Linux kernel. Lilo places the boot sector backups in this directory.

/dev - This is a very interesting directory that highlights one important characteristic of the Linux filesystem - everything is a file or a directory. Look through this directory and you should see hda1, hda2 etc, which represent the various partitions on the first master drive of the system. /dev/cdrom and /dev/fd0 represent your CDROM drive and your floppy drive. This may seem strange but it will make sense if you compare the characteristics of files to that of your hardware. Both can be read from and written to. Take /dev/dsp, for instance. This file represents your speaker device. So any data written to this file will be re directed to your speaker. Try 'cat /etc/lilo.conf > /dev/dsp' and you should hear some sound on the speaker. That's the sound of your lilo.conf file! Similarly, sending data to and reading from /dev/ttyS0 ( COM 1 ) will allow you to communicate with a device attached there - your modem.

/etc - This directory contains all the configuration files for your system. Your lilo.conf file lies in this directory as does hosts, resolv.conf and fstab. Under this directory will be X11 sub-directory which contains the configuration files for X. More importantly, the /etc/rc.d directory contains the system startup scripts. This is a good directory to backup often. It will definitely save you a lot of re-configuration later if you re-install or lose your current installation.

/home - Linux is a multi-user environment so each user is also assigned a specific directory which is accessible only to them and the system administrator. These are the user home directories, which can be found under /home/username. This directory also contains the user specific settings for programs like IRC, X etc.

/lib - This contains all the shared libraries that are required by system programs. Windows equivalent to a shared library would be a DLL file.

/lost+found - Linux should always go through a proper shutdown. Sometimes your system might crash or a power failure might take the machine down. Either way, at the next boot, a lengthy filesystem check using fsck will be done. Fsck will go through the system and try to recover any corrupt files that it finds. The result of this recovery operation will be placed in this directory. The files recovered are not likely to be complete or make much sense but there always is a chance that something worthwhile is recovered.

/mnt - This is a generic mount point under which you mount your filesystems or devices. Mounting is the process by which you make a filesystem available to the system. After mounting your files will be accessible under the mount-point. This directory usually contains mount points or sub-directories where you mount your floppy and your CD. You can also create additional mount-points here if you want. There is no limitation to creating a mount-point anywhere on your system but convention says that you do not litter your file system with mount-points.

/opt - This directory contains all the software and add-on packages that are not part of the default installation. Generally you will find KDE and StarOffice here. Again, this directory is not used very often as it's mostly a standard in Unix installations.

/proc - This is a special directory on your system. We have a more detailed article on this one here.

/root - We talked about user home directories earlier and well this one is the home directory of the user root. This is not to be confused with the system root, which is directory at the highest level in the filesystem.

/tmp - This directory contains mostly files that are required temporarily. Many programs use this to create lock files and for temporary storage of data. On some systems, this directory is cleared out at boot or at shutdown.

/usr - This is one of the most important directories in the system as it contains all the user binaries. X and its supporting libraries can be found here. User programs like telnet, ftp etc are also placed here. /usr/doc contains useful system documentation. /usr/src/linux contains the source code for the Linux kernel.

/var - This directory contains spooling data like mail and also the output from the printer daemon. The system logs are also kept here in /var/log/messages. You will also find the database for BIND in /var/named and for NIS in /var/yp.


As you can see, its actually an awesome system. it means that when a package is installed all applications know exactly where to find it. its not unusual to have an application with a dozen other packages it needs (dependencies), imagine if you had to have a copy of each one in application folder.

It also has the advantage of keeping things together, logs and config files a good example. The windows way of throwing shit and leaving it where it lands is not a good system.

To back up all your personal files and configuration for every application you use, along with bookmarks and email all you have to do is copy /home/username. When you copy that onto a new system everything will be exactly as you had it before (assuming the same apps are installed)
To backup up all your stuff on a windows system is insane, you need to go to every application's folder (which are sprinkled around the disk) and decipher which files are configuration files and which are rubbish. You need to copy every one of these, track down all your working folders and copy them too. To get them working again is even more difficult. Thats not even mentioning the registry.

Once you get used to using the directory structure you will wonder how you managed to get anything done on a windows machine, and learn to get pissed off at people like google who insist on binary blob installs which goes against the rules.

Last edited by RAOVQ; 2008-10-27 at 13:43.
Reply With Quote
  #5   Add zeusy to your ignore list  
Old 2008-10-27, 16:55
zeusy zeusy is offline
Regular
 
Default Re: What's up with the lunix filesystem?

Quote:
Originally Posted by RAOVQ View Post
To save re-inventing the wheel, shamelessly stolen from http://www.freeos.com/articles/3102/:
I belive this is the Linux filesystem.
He probably means the unix filesystem.
/bin /sbin /boot /dev /etc /lib are required to boot the system. They're might be more, depending on which UNIX variant.
See `man hier`.

Quote:
Originally Posted by RAOVQ View Post
As you can see, its actually an awesome system. it means that when a package is installed all applications know exactly where to find it. its not unusual to have an application with a dozen other packages it needs (dependencies), imagine if you had to have a copy of each one in application folder.

It also has the advantage of keeping things together, logs and config files a good example. The windows way of throwing shit and leaving it where it lands is not a good system.

To back up all your personal files and configuration for every application you use, along with bookmarks and email all you have to do is copy /home/username. When you copy that onto a new system everything will be exactly as you had it before (assuming the same apps are installed)
To backup up all your stuff on a windows system is insane, you need to go to every application's folder (which are sprinkled around the disk) and decipher which files are configuration files and which are rubbish. You need to copy every one of these, track down all your working folders and copy them too. To get them working again is even more difficult. Thats not even mentioning the registry.

Once you get used to using the directory structure you will wonder how you managed to get anything done on a windows machine, and learn to get pissed off at people like google who insist on binary blob installs which goes against the rules.
UNIX love .
User specific config are (by unwritten convention) in a . directory in the user's home dir.
The filesystem differs depending on the UNIX variant.

For example, non-system config and non-user specific config files are in /usr/local/etc on FreeBSD, while most distros, they're stored in /etc too.
Solaris replaced major parts of the filesystem by an *SMF* system controlled by an SQL frontend.
Reply With Quote
Reply

Tags
filesystem , folder , goatse , linux , unix


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT. The time now is 13:48.


 

 

totse.com certificate signatures
 
 
About | Advertise | Art | Carnality | Community | Contact Us | Copyright Policy | Entertainment | FAQ
Link to totse.com | Science | Search | Society | Submissions | Technology
Hot Topics
Littering Is Awsome
Eradicating Feral Species
International Hanky Movement
Toilet paper down the toilet
Ecovillage project
The world is not going to flood!
Where is safe from climate change?
Global warming
 
Sponsored Links
 
Ads presented by the
AdBrite Ad Network

 

TSHIRT HELL T-SHIRTS

 
Map of the World
Map of the World Art Print
Elizabeth, Mary
Buy at AllPosters.com