forums Computer Tutorials Computer Help and Spyware Removal File DatabaseUninstall Database Windows Startup Programs Database Computer Resources Computer Glossary Forums Computer Help and Spyware Removal
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

 
Reply to this topicStart new topic
> Linux File System Layout
american.swan
post Apr 5 2008, 09:00 PM
Post #1


Member
**

Group: Members
Posts: 27
Joined: 13-December 07
Member No.: 176,347



I have search the net many times and found document after document explaining each section of the Linux file system.

I read these long documents and I guess I have to just brute memorize where everything goes.

Could someone please explain WHY Linux does it that way? WHY? I don't want to know where web viewable folders are. I want to know WHY there there.

Windows is so simple. Windows director. Program Files directory. It seems straight forward. Linux is a totally different animal.

If you ask someone why Microsoft office is installed in the Program Files directory of windows everyone and his cousin can tell you why. Cause it's a program. Duh. If you install Open Office on Linux on the other hand, I for one have no idea where the files are and even if I did know where they were installed to...I don't know the WHY...the rational for why Mr. Linux himself decided to put them there.

Can someone please explain the WHY? Why is linux' file system the mess it is. Because if I understand WHY...it wouldn't be a mess anymore.
Go to the top of the page
 
+Quote Post
Amazing Andrew
post Apr 6 2008, 06:01 AM
Post #2


Bleepin' Night Watchman
******

Group: BC Advisor
Posts: 1,762
Joined: 5-December 05
From: The City of Saint Francis, by the western sea
Member No.: 43,307



A very good question, in my option. According to my reading, the Linux directory structure (which is based on the Unix structure) aims to adhere to the "File System Hierarchy Standard" (AKA the "FSSTND"). If you're feeling bold, you can try banging your head against it for a while at: http://www.pathname.com/fhs/pub/fhs-2.3.html

The short-short answer is that it draws influences from many different systems, is designed by a consensus of various Linux Gurus, and tries to be as logical and efficient as possible while keeping files grouped by purpose rather than by parent application (e.g. all documentation files are in one spot, all executables in another, etc. regardless of what program installed them.) Plus there's the need to keep some files (like powerful administration tools) separate from others in places that only the root user is supposed to be able to access.

Further reading for the terminally curious:
http://tldp.org/LDP/Linux-Filesystem-Hiera...html/index.html
http://rute.2038bug.com/node38.html.gz

The above links lead to rather long and thick documents describing the standard. For a somewhat concise version, read the "forward" to the first document.

This post has been edited by Amazing Andrew: Apr 6 2008, 06:04 AM


--------------------
Go to the top of the page
 
+Quote Post
Joedude
post Apr 6 2008, 06:24 AM
Post #3


Forum Regular
***

Group: Members
Posts: 336
Joined: 2-June 06
From: Sutton Coldfield, West Midlands, England
Member No.: 70,484



It takes that further and seperates system files from user files so that permissions remain integrous without affecting the system application. In other words, when you make a change, in general, to how an application runs, that change is made in your home folder. For everyone else on the system it will run as it's defaults make it until they change it for their home systems. This way, as can happen in windows, you rarely run into the messed up permissions problem which prevents you from doing something.

Also, as far as file altering, like viruses, spyware, and the like, they can not hurt your system files at all because unless you are running as root, they have no access to them. They can only affect your home folder. Not that there are a lot of Linux exploits that a non server user would have to concern himself with anyway.


--------------------
If someone tells you to su rm -rf /
DON'T DO IT!!!!
Be in the know, Bash smart!
Go to the top of the page
 
+Quote Post
Trio3b
post Apr 6 2008, 09:56 PM
Post #4


Member
**

Group: Members
Posts: 39
Joined: 7-July 06
Member No.: 75,020



The preceding two answers are probably the most important. One more is answered in the form of a question.

Have you ever tried to remove an application in Windows and you get that little notification box that Windows could not remove all the files and you may have to poke thru the system in various locations and remove them manually?

This post has been edited by Trio3b: Apr 6 2008, 10:02 PM
Go to the top of the page
 
+Quote Post
american.swan
post Apr 7 2008, 12:40 AM
Post #5


Member
**

Group: Members
Posts: 27
Joined: 13-December 07
Member No.: 176,347



QUOTE(Trio3b @ Apr 7 2008, 11:56 AM) *
The preceding two answers are probably the most important. One more is answered in the form of a question.

Have you ever tried to remove an application in Windows and you get that little notification box that Windows could not remove all the files and you may have to poke thru the system in various locations and remove them manually?


I guess I have gotten that quite often. One example is if I open a media file and the file fails to open properly and I want to delete it. It won't let me because it's still claims to be in use.

I generally don't have that problem when removing a program, but I definitely know what your talking about.

How is that linked with Linux?

Linux lets you delete whatever file you want if your have the right permissions. Same for programs. What does that have to do with anything?
Go to the top of the page
 
+Quote Post
Trio3b
post Apr 10 2008, 11:25 PM
Post #6


Member
**

Group: Members
Posts: 39
Joined: 7-July 06
Member No.: 75,020



Another link here.

An excerpt:

"This kind of layout, known as the unified filesystem, does offer several
advantages over the approach that Windows uses. Let's take the example of
the /usr directory. This directory off the root directory contains most of
the system executables. With the Linux filesystem, you can choose to mount
it off another partition or even off another machine over the network. The
underlying system will not know the difference because /usr appears to be
a local directory that is part of the local directory structure! How many
times have you wished to move around executables and data under Windows,
only to run into registry and system errors? Try moving c:windowssystem
to another partition or drive."


Although there may be some elements of tradition, according to this article there is flexibility compared to other file systems. I guess you know that as a rule Linux filesystems are less susceptible to fragmentation. It is somewhat confusing for the new user, but on any arbitrary scale it is no less "learnable" than any other system.

Hopefully this explains some of the why you are seeking.



This post has been edited by Trio3b: Apr 10 2008, 11:30 PM
Go to the top of the page
 
+Quote Post
Amazing Andrew
post Apr 11 2008, 03:14 AM
Post #7


Bleepin' Night Watchman
******

Group: BC Advisor
Posts: 1,762
Joined: 5-December 05
From: The City of Saint Francis, by the western sea
Member No.: 43,307



QUOTE(Trio3b @ Apr 10 2008, 09:25 PM) *
I guess you know that as a rule Linux filesystems are less susceptible to fragmentation.


Actually, this is independant of the directory structure and is a feature of several of the filesystems used for Linux such as EXT2 and EXT3. http://geekblog.oneandoneis2.org/index.php...d_defragmenting


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 20th July 2008 - 09:01 AM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Malware Removal Guides

© 2003-2008 All Rights Reserved Bleeping Computer LLC.