The /var
directory contains
all operative data for programs running on the system. Unlike the working
data in /tmp
, this data must be kept intact in the
event of a reboot. There are many sub-directories, and some are very
useful:
/var/log
:
contains the system's log files which you may read to troubleshoot
your system (/var/log/messages
and
/var/log/kernel/errors
to only name those
two).
/var/run
: used to keep track
of all processes utilized by the system since it was booted,
enabling you to act on them in the event of a system
runlevel change (see Chapter 11, The Start-Up Files: init sysv).
/var/spool
:
contains the system's working files waiting for some kind of action or
processing. For example, /var/spool/cups
contains
the print server's working files, while
/var/spool/mail
contains the mail server's
working files (for example, all mail arriving and leaving
your system).