Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What goes in /var?

Tags:

linux

command

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?

like image 240
dasdasdasdasd Avatar asked Aug 29 '13 14:08

dasdasdasdasd


People also ask

What do you put in a var?

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.

What is stored in var lib?

/var/lib/pgsql is where Postgres stores all its internal data, including the data you put into a database.

What is var run used for?

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.

What does var stand for Linux?

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). /


1 Answers

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".

like image 110
Fred Foo Avatar answered Oct 04 '22 10:10

Fred Foo