The /var Hierarchy
/var is intended for Variable data (surprise surprise). This includes spool
directories and files, administrative and logging data, and some temporary
files. Some parts of /var are shareable, but understandably much of it isn't.
/var contains:
- account
- cache
- crash
- cron
- games
- lock
- log
- mail
- opt
- run
- spool
- state
- tmp
- yp
There are also some directories which are reserved for use by the sysop, or
by old software which dosn't comply with the FHS (yet).
- backups
- local
- msgs
- preserve
A brief introduction to the subdirectories.
- account
- The current process accounting logs. (if supported).
- cache
- Cache directories, ie fonts, man, www, etc.
- crash
- This is where the system crash dumps should be written. (if supported).
- cron
- Under linux /var/cron used to be /var/spool/cron. It has been moved out
of /var/spool to fit the definition of /var/spool better. /var/spool was
chosen due to precedent in BSD UNIX.
- games
- Variable game data (ie levels, high scores, etc).
- lock
- Hopefully all lock files will soon be in the one place. There is also a
standard format for lock files defined. (the HDB UUCP lock file format).
- log
- Most logs should be written to this directory or an appropriate
subdirectory.
- opt
- Variable data should be installed in /var/opt/<package>, where
<package> is the name of the subtree in /opt where the add-on package
is installed. Some variable data may be installed under /etc.
- run
- This directory contains system information files describing the system
since it was booted. This directory should be emptied every reboot. PID
files, once put in /etc, should now be put here. There is a standard for the
PID files specified, and a few other files should be in here as well. See
the standard for more details.
- spool
- Spool directories.
- state
- Variable state information. This directory is used to preserve the state
of an application between invocations, and instances. It should remain valid
after a reboot, and should not contain logging, or spooled data. Packaging
systems (ie rpm, dselect) will be using subdirectories under /var/state to
maintain package data.
- tmp
- Used for storing temporary data which needs to be preserved between
reboots. Data to be deleted in a site-specific manner.
- yp
- Variable data for NIS. NIS+ should use /var/nis instead.
<<<
Contents
>>>
Andrae Muys
Version: $Id: var.html,v 2.2 2000/01/06 13:21:14 clinton Exp $