I read The Linux Command Line by William Shotts, and there are some descriptions of Linux files (system directories):
The
/var
directory contents don't change. This tree is where data that is likely to change is stored. Various databases, spool files, user mail, etc. are located here.
I am wondering: If the /var
directory contents are not supposed to change, why is there a www
directory in /var/www
after installing apache-php
?
The /var/www
directory is where we must edit, create or delete files. This is a localhost public directory.
Why did he say, that the /var
directory contents don't change?
Use /var if you have a set number of files which may be growing (i.e. due to log appending or rotation) over time so as not to run out of disk space.
/var/lib/pgsql is where Postgres stores all its internal data, including the data you put into a database.
A new TMPFS-mounted file system, /var/run , is the repository for temporary system files that are not needed across system reboots in this Solaris release and future releases. The /tmp directory continues to be repository for non-system temporary files.
var stands for variable( it holds variable data, the directory it contains are changing in size every time) /opt stands for optional (generally third party Software are installed in this directory). /
That description of /var
is self-contradictory. /var
contains things that are prone to change, such as websites, temporary files (/var/tmp
) and databases. The name is an abbreviation of "variable".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With