 |
|
File System
Hierarchy Standard
Oracle Database Tips by Donald Burleson |
Fedora and other Redhat distributions have a
standardized file system that makes finding different kinds of files
predictable. This standard is referred to by Redhat as the File System
Hierarchy Standard. Table 3.1 lists many of the directories that are
found in the main partition of Fedora, along with the purpose for each
one.
Directory |
Purpose |
/ |
This
directory is the mount point for the main system partition. |
/bin |
This
directory contains executables available to all users. |
/boot |
This
directory is the mount point for the boot partition. |
/dev |
This
directory contains file system entries which represent devices
that are or could be attached to the system. |
/etc |
This
directory contains configuration files. Binary files should not be
stored in this directory. |
/etc/include |
This is the
location of include files used in C programs, such as stdio.h. |
/etc/skel |
Files
placed in this directory are automatically copied to a new user's
home directory when that user is created. |
/home |
This is the
default parent directory for users? home directories (except
root). For example, the user FRED will have his home directory at
/home/fred unless his account was setup otherwise. |
/lib |
This
directory contains libraries needed to execute the binaries stored
in /bin and /sbin. |
/mnt |
This
directory contains mount points for temporarily mounted file
systems such as CDROMS and floppy disks. |
/opt |
This
directory contains subdirectories for application software that
has been installed by users. |
/proc |
This
directory contains files that extract information from or send
information to the kernel. |
/root |
This
directory is the root user's home directory. |
/sbin |
This
directory contains executables to be used by the root user. It
also contains files that are necessary when booting the system. |
/tmp |
This
directory is used to store temporary files. |
/usr |
This
directory contains files that can be shared between the users of
the system. |
/usr/local |
This
directory can be used by the system administrator to install
software. |
/var |
This
directory is used to allow programs to spool data, write log
files, write temporary files, etc. |
~/ |
This is an
abbreviation for the user's home directory. |
Table 3.1:
Directories found in the main
partition of Fedora
The Proc File System
The proc file system is a virtual file system that
is mounted at boot time. It is a virtual file system because it does
not refer to a physical storage device such as a disk partition. Its
purpose is to allow the user to communicate with the kernel.
Parameters can be sent to the kernel while the system is running
through virtual files on the proc file system, and information about
the system at runtime can be obtained from virtual files in the proc
file system.
An important example of using the proc file system
can be seen in the command cat /proc/swaps, which returns the current
usage of the swap space. Another example is the top command, which
starts an ongoing process that monitors CPU and memory usage. The top
process gets its information from the proc file system. Type ?q? to
quit the top process.
System Configuration
Files
For the most part, the Linux operating system and
the programs installed on it hold their settings in text files. In the
previous chapter, the redhat-config-network
program was used to configure the network. This program saves changes
by writing to text configuration files. Table 3.2 describes many of
the configuration files used to configure Fedora Linux.
PATH AND
CONFIGURATION FILE |
PURPOSE |
/etc/bashrc |
System wide
aliases and functions. This script is run when a user logs into a
bash terminal, the default terminal for all users unless set up
otherwise. |
/etc/fstab |
Configures
file systems that Linux will attempt to mount on startup. Also
lists mount-points for devices allowing them to be mounted with an
abbreviated command. |
/etc/group |
Lists what
groups are on the operating system and what users are members of
each group. |
/etc/grub.conf |
The boot
loader configuration file. |
/etc/hosts |
This file
is used to resolve host names on the network. It is accessed
before checking DNS. |
/etc/hosts.equiv |
Specifies
trusted users on remote systems that can execute commands on the
local system. Requires the xinetd deamon to be configured and
running. |
/etc/inittab |
The first
configuration file run after booting. Defines the default
run-level after boot. Run-level 3 boots to a command prompt that
supports multiple logins, with network access. Run-level 5 boots
to a graphical user interface. |
/etc/modules.conf |
Kernel
modules configuration file. |
/etc/mtab |
This
configuration file lists what is mounted currently. It should not
be edited with a text editor. Use the mount command instead. |
/etc/passwd |
The system
password file, lists user information |
/etc/profile |
System wide
environment setup startup programs for logins. |
/etc/rc.local |
This is the
final script run when the system is started. It is a common
practice for the administrator to add commands to this file that
should be run when starting up the node. |
/etc/resolv.conf |
This file
configures where Linux will look for a name server. |
/etc/shadow |
Account
passwords for users to login are encrypted and stored in this
file. This file is only readable by the root user. |
/etc/sysconfig/network |
This file
contains the hostname for the node. |
/etc/sysctl.conf |
Kernel
configuration file. |
Table 3.2:
Configuration files used to
configure Fedora Linux
User Configuration
Files
A number of configuration files can be found in
each user's home directory, including root's home directory /root.
These files are ?hidden? from the ls command; a feat accomplished by
naming the files with a period as the first character, as the
filename. The command ls ~/ -a will return a list of all files in the
home directory, including hidden files.
The /etc/skel directory is used to store files
that are automatically copied into a user's home directory when that
user is created by root. To make a change to the default configuration
files used for all users created from this point forward, simply edit
or create a file in the /etc/skel directory.
Table 3.3 explains the purpose of the most common
user configuration files.
PATH AND
CONFIGURATION FILE |
PURPOSE |
~/.bash_logout |
User
specific logout routine. |
~/.bash_profile |
User
specific environment & startup programs. This file is only run
when a user logs in. It is not run when the sucommand is run to switch user logins. |
~/.bashrc |
User
specific aliases and functions. This file defines aliases and
functions. It is not necessary to logout of the gnome windows
manager after editing this file to make changes effective. Simply
open a new terminal window. |
~/.emacs |
User
specific emacs text editor configuration. |
Table 3.3:
Most common user configuration
files.
 |
If you want to learn RAC at home, get the bestselling book "Personal
Oracle Real Application Clusters" by Edward Stoever.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot of Oracle tuning scripts. |
|