Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Systems > Linux / BSD / OS X
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 05-10-2002, 01:47 PM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
/usr vs /var

is there any quick explination for these 2 directories? what type of files go in the /usr director vs the /var directory?
__________________
sde is offline   Reply With Quote
Old 05-10-2002, 05:31 PM   #2 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
Here's a basic rundown of the entire Linux / UNIX directory structure, just FYI:
  • '/' (root) - top level
  • '/boot' - occasionally you'll have this as a seperate partition, to defeat any 1024 cylinder problems. Stores your boot information and usually the kernel. Takes up little space.
  • '/bin' - where most of the system binaries are kept, all the basic utilities that the system would need to run, basic stuff like 'login' or 'ls'. Takes up average space. Not normally on it's own partition, no need to be.
  • '/etc' - stores most of the configuration data, sysinit structure and files. This is almost always included as part of the root partition, no need to have it on a seperate one. Takes up little space.
  • '/home' - normally user home directories, on some systems where the ftp and http servers keep their directories. You can mount this on a seperate partition to give yourself lots of room for MP3s, or maybe export it via NFS to another system.
  • '/var' - all the 'variable' files are stored here. This is the most accessed of the entire filesystem, and should be on it's own partition. I find that REISERFS makes a particularly good filesystem to use for the '/var' partition, as it's very fast and best dealing with very small files as found on '/var'. All logging is done to this directory, all spooling and all other dynamic files are stored here. Security wise, it's smart to have '/var' on a seperate partition because it someone hits you with a DoS attack or similar, all the logs created by that will not fill up the root filesystem and crash your system. Takes up a good amount of space, figure using 500MB - 1GB of drivespace.
  • '/root' - this is the root user's home directory, not to be confused with the root partition. Takes up little space.
  • '/usr' - stores most of the bulk of the system, source code, kernel source and all the applications are normally stored under '/usr'. You can create it's own filesystem just to make sure you have enough room for everything, but it's not really a security issue.
  • '/tmp' - temporary directory, sometimes a symlink back to '/var/tmp'. Takes up as much space as it wants. ;-) Not normally it's own partition.
  • '/dev' - all the device files.
  • '/opt' - optional software. Somewhat of a throwback to the older days where optional software could be installed rather than putting it under '/usr'.

Hope this answers your question.
__________________
bdl is offline   Reply With Quote
Old 05-10-2002, 05:47 PM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
thanks! that is some great information... i think that would be a great NUM.
__________________
sde is offline   Reply With Quote
Old 05-10-2002, 05:57 PM   #4 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
Ok, I'll work on refining it and put it up.
__________________
bdl is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 08:36 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle