FILE SYSTEM
File System Structure
1.
Red Hat has chosen to follow the standards outlined in the File system
Hierarchy Standard (FHS).
2.
The FHS provides
specific requirements for the placement of files in the directory structure and
placement is based on the type of information contained in the file.
3.
Basically two
categories of file information exist: shareable or unshareable, and variable
or static.
4.
Shareable files
are files that can be accessed by other hosts, and unshareable files can be
accessed only by the local system.
5.
Variable files
contain information that can change at any time on their own, without anyone
actually changing the file. A log file is an example of such a file. A static
file contains information that does not change unless a user changes it.
Program documentation and binary files are examples of static files.
6.
Linux’s method of
mounting its file systems in a flat, logical, hierarchical method has
advantages over the file system mounting method used by Windows.
7.
Linux references
everything relative to the root file system point /, whereas Windows has
a different root mount point for every drive.
8.
If you have a
/usr partition that fills up in Linux, you can create another file system
called /usr/local and move your /usr/local data from /usr to the new file
system definition.
9.
This practice
frees up space on the /usr partition, and is an easy way to bring your system
back up to a fully functional state.
10. This trick wouldn’t work on a Windows
machine, because Windows maps its file locations to static device disk
definitions.
11. You would have to change programs’
file references from c:\ to d:\, and so forth. Linux’s file system management
is another good reason to use Linux on your production servers instead of
Windows.
The / directory
1) The / directory is called the root directory
and is typically at the top of the file system structure.
2) In many systems, the / directory is
the only partition on the system and all other directories are mounted under
it.
3) The primary purpose of the / directory
is booting the system, and to correct any problems that might be preventing the
system from booting.
4) According to the FHS, the / directory
must contain, or have links to, the following directories:
i) bin — This directory contains command
files for use by the system administrator or other users. The bin directory can
not contain subdirectories.
ii) boot — On Red Hat systems, this is the
directory containing the kernel, the core of the operating system. Also in this
directory are files related to booting the system, such as the bootloader.
iii) dev — This directory contains files
with information about devices, either hardware or software devices, on the
system.
iv) etc — This directory and its
subdirectories contain most of the system configuration files. If you have the
X Window System installed on your system, the X11 subdirectory is located here.
Networking related files are in the subdirectory sysconfig. Another
subdirectory of etc is the skel directory, which is used to create files in users’
home directories when the users are created.
v) home — This directory contains the
directories of users on the system. Subdirectories of home will be named for
the user to whom they belong.
vi) lib — The shared system files and
kernel modules are contained in this directory and its subdirectories.
vii)mnt — This directory is the location
of the mount point for temporary file systems, such as a floppy or CD.
viii)
opt — This
directory and its subdirectories are often used to hold applications installed
on the system.
ix) proc — Information about system
processes is included in this directory.
x) sbin — Contained in this directory are
system binaries used by the system administrator or the root user.
xi) tmp — This directory contains
temporary files used by the system.
xii)
usr — This
directory is often mounted on its own partition. It contains shareable,
read-only data. Subdirectories can be used for applications, typically under
/usr/local.
No comments:
Post a Comment