LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-16-2003, 11:08 AM   #1
xconspirisist
Member
 
Registered: Dec 2002
Location: United Kingdom
Distribution: Ubuntu
Posts: 276

Rep: Reputation: 30
explain the ( very messy ) unix file system ?


first of all, please dont flame for incorrect terminology --- Im refuring to the way that unix stores its files. IMO, it looks like a complete and utter MESS, directorys for file types, etc, etw. I prefur the windows, all of an app fits into one folder, which can be deleted / moved to preference. Anyway, instead of casuing an arguement, could you explain what the common directorys are used for ?

some ones ive seen so far : /var /src /usr, those sort of ones could do with explaining. Cheers.
 
Old 10-16-2003, 12:00 PM   #2
Edward78
Member
 
Registered: Jul 2002
Distribution: OpenSuSE 11
Posts: 441

Rep: Reputation: 30
/var is various (sp) for well none specific things, /src is source it has the source code for uncompiled programs, /usr, is unix system resources. There is a page somewhere that has this info, I don't have to link though.
 
Old 10-16-2003, 12:05 PM   #3
jkobrien
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507

Rep: Reputation: 30
Have a look at the Slackware book. Other distributions might have slightly different root directories, and you can customise what goes where pretty much anyway you want, but this will give you the basic idea.

John

p.s. just looked myself and noticed that src isn't described. That means "source" and is a directory for source code (not so mysterious!), but you'll find src directories all over the place /usr/src, /usr/local/src, wherever you want to put one.

J
 
Old 10-16-2003, 12:23 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 261Reputation: 261Reputation: 261
This has been asked numerous times and tons of sites that explain these.

/boot = Holds boot information.
swap = Well, virtual memory.
/ = Self explanatory, everything falls below the root directory
/root = Root's home directory
/home = Where users home directories reside.
/usr = Where most programs are stored and commands usually accessible by users rather than just root.
/bin = Sytem type commands are stored here
/sbin = Commands usually only root has access to run, or in root's path, etc.
/var = Like edward stated, for Various files, usually log files, html files for web server, mysql and database files.. and so on.
/tmp = Temporary files.
/mnt = Usually the main directory used to create empty directories to mount other devices, cdrom, floppy and so on.
/proc = This is created at boot time, running processes, system information, etc.
/dev = Where all your devices for your system are stored, referenced to, etc.
/usr/local = Usually the default location where programs installed by users will be stored.
/usr/src = Where kernel source files are stored, etc.

If I missed any other important ones, let me know... Hope this helps.
 
Old 10-16-2003, 12:28 PM   #5
Booster
Member
 
Registered: Sep 2003
Location: Ontario, Canada
Distribution: Gentoo, Suse
Posts: 59

Rep: Reputation: 15
(Edit) I see trickykid beat me to it, but here it is anyway(/Edit)

There's a good, but reasonably brief, document on the file system hierarchy here: http://www.redhat.com/docs/manuals/l...ystem-fhs.html

To quickly describe a the important ones:

/etc - Configuration files
/sbin - essential system executable files necessary for the system to boot (ie:swapon to enable the swapfile)
/bin - essential user executable files (ie: shells)
/dev - devices (sound, modem, etc)
/usr - essentially where "everything non-essential to booting" is kept
/usr/bin - where "most commands" are - ftp, vim, xmms etc
/var - "variable files", for things loke logs (/var/log/mesages), print spools, etc
/tmp -temp

An example:
If you install an app called "appx", it might install a configuration file as /etc/appx.conf, an executable in /usr/bin, a logfile for it might be /var/log/appx/error.log, etc

Hope that helps a bit, I know it's pretty obscure looking when you first are exposed to it, but, believe it or not, you get used to it, and it simplifies things.

Cheers!

Last edited by Booster; 10-16-2003 at 12:29 PM.
 
Old 10-16-2003, 12:28 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,197

Rep: Reputation: 3964Reputation: 3964Reputation: 3964Reputation: 3964Reputation: 3964Reputation: 3964Reputation: 3964Reputation: 3964Reputation: 3964Reputation: 3964Reputation: 3964
http://www.pathname.com/fhs/2.2/index.html#TOC
 
Old 10-16-2003, 12:34 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 261Reputation: 261Reputation: 261
How could I have missed /etc.. I knew mine looked goofy in my list without /etc..
 
Old 10-16-2003, 12:38 PM   #8
xconspirisist
Member
 
Registered: Dec 2002
Location: United Kingdom
Distribution: Ubuntu
Posts: 276

Original Poster
Rep: Reputation: 30
Thanks for the responces, a lot of help, cheers. The links will be read later though. But, can I effectivly rename these directorys - mearly as a point of customisation, from /var to /various /etc to /configuration ? Or would that pretty much screw stuff up ? Cheers.

Oh, on the subject of renaming - hiding a directroy by putting a ' . ' in front of it, ie : ' .gnome ' - is that going to ' screw things up because the app is looking for ' gnome ' ? Cheers again
 
Old 10-16-2003, 12:38 PM   #9
dvogel
LQ Newbie
 
Registered: Mar 2003
Posts: 9

Rep: Reputation: 0
It's really simple

There are quite a few reasons files are grouped by type rather than software. Some reasons are rooted in history and some in practicality.

Different types of files require different aspects of a file system. /var is the classic example of file systems improving performance. Many servers mount /var with the "noatime" option. When this option is used, the access time is not updated when a file is accessed. This is important when you are running a news server with 100 accesses per second. Another example is the "noexec" option. You can prevent a large percentage of local security exploits by mounting /home with the "noexec" option. This option prevents any files on the filesystem from being executed.

Furthermore, the directory gives a context to a file. If you are in a /etc directory, you know a given file is a configuration file. If you group all files in a single directory, you need additional information. In the Windows world, this is usually achieved with a file extension.

Many people are confused by the existence of /bin and /sbin. Generally only administrators should need files in the /sbin directories. Therefore, non-administrative users exlude /sbin from their PATH environment variable. This keeps the list of filename completions (while using the shell) to only what the user needs. For example, a normal user doesn't need to use /sbin/ifconfig but they may use /usr/bin/ifnames. If they typed "if" into the shell and pressed tab, they wouldn't want "ifconfig" to be listed.

Furthermore, back in the day, 90% of software on a computer was shipped with the operating system. Therefore, the file system organization was used to enable the software to be used in conjuction more easily. As independant software vendors became more prevalent, the /opt directory was created. ISVs were supposed to install their software to /opt/<ISV name>/ (with /bin, /etc, /var, and so on as sub directories). Unfortunately it never really caught on. Although, you could use this on your system.

I hope this helps. Feel free to have me clarify anything you don't understand.
 
Old 10-16-2003, 12:45 PM   #10
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 261Reputation: 261Reputation: 261
Quote:
Originally posted by technowax
Thanks for the responces, a lot of help, cheers. The links will be read later though. But, can I effectivly rename these directorys - mearly as a point of customisation, from /var to /various /etc to /configuration ? Or would that pretty much screw stuff up ? Cheers.

Oh, on the subject of renaming - hiding a directroy by putting a ' . ' in front of it, ie : ' .gnome ' - is that going to ' screw things up because the app is looking for ' gnome ' ? Cheers again
Unless you want to go thru and change every reference to every program or the such, I would advise to not change the names of these directories, it would cause utter chaos. No reason to make them hidden either, same reason I stated above.

Cheers.
 
Old 10-16-2003, 12:49 PM   #11
xconspirisist
Member
 
Registered: Dec 2002
Location: United Kingdom
Distribution: Ubuntu
Posts: 276

Original Poster
Rep: Reputation: 30
Okey, no problem. I only mentioned it because I was curious.

Hiding folders - I only want to hide things in my user directory - is that still going to cause ' chaos ' ?
 
Old 10-16-2003, 12:52 PM   #12
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 261Reputation: 261Reputation: 261
Quote:
Originally posted by technowax
Okey, no problem. I only mentioned it because I was curious.

Hiding folders - I only want to hide things in my user directory - is that still going to cause ' chaos ' ?
Most likely not, only depends on what your hiding and if a program needs to access it, etc.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable characters wich are added by the unix system after FTP a file TDABN77 Linux - Newbie 2 12-02-2005 01:54 PM
want to mount a remote unix-based file system to fc2, nfs the answer? how? parv Fedora 3 09-23-2004 12:28 PM
can somebody explain the different components of a linux system? sunowww Linux - General 4 03-14-2004 06:18 PM
Unix file system Swift&Smart General 4 02-17-2003 10:45 AM
UNIX file system changes Micha Agovic Linux - General 6 07-31-2001 06:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration