Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1
as  CPU load,   swap    file    usage,  and processes   in  /proc/stat.

Working with Shared Data in the /usr Directory


The /usr directory contains software applications, libraries, and other types
of shared data for use by anyone on the system. Many Linux system
administrators give /usr its own partition. A number of subdirectories under
/usr contain manual pages (/usr/share/man), software package shared
files (/usr/share/name_of_package, such as
/usr/share/emacs), additional application or software package
documentation (/usr/share/doc), and an entire subdirectory tree of
locally built and installed software, /usr/local.


Temporary File Storage in the /tmp Directory


As its name implies, the /tmp directory is used for temporary file storage. As
you use Linux, various programs create files in this directory. Files in this
directory are cleared daily by a cron job and every time the system is
booted.


Accessing Variable Data Files in the /var Directory


The /var directory contains subdirectories used by various system services
for spooling and logging. Many of these variable data files, such as print
spooler queues, are temporary, whereas others, such as system and kernel
logs, are renamed and rotated in use. Incoming email is usually directed to
files under /var/spool/mail.


Linux also uses /var for other important system services, such as the
topmost File Transfer Protocol (FTP) directory under /var/ftp (see
Chapter 34, “Remote File Serving with FTP”), and the Apache web server’s
initial home page directory for the system, /var/www/html. (See Chapter
25 , “Apache Web Server Management,” for more information about using
Apache.)


NOTE
There is a recent trend to move data that is served from /var/www and
/var/ftp to /srv, but it is not universal.
Free download pdf