我阅读了William Shotts的Linux命令行,并且有一些关于linux文件(系统目录)的描述" /var目录内容不会改变.这个树是存储可能改变的数据的地方.各种数据库,假脱机文件,用户邮件等位于此处."
我感兴趣的是,如果/var目录内容没有改变,为什么  在安装`apache-php``后会存在www文件夹/var/www.
/var/www文件夹是我们必须编辑,创建或删除文件的地方,这是一个localhost公共目录,你能给我回答吗?为什么他说,/var目录内容不会改变.
Fre*_*Foo 31
这种描述/var是自相矛盾的./var包含易于更改的内容,例如网站,临时文件(/var/tmp)和数据库.该名称是"变量"的缩写.
预期可用的各种文件(包括目录)的定义由Linux 文件系统层次结构标准和Linux标准库提供.在/ VAR层次
包含可变数据文件.这包括假脱机目录和文件,管理和日志记录数据以及临时和临时文件.
有趣的/var/www/是,这种规范性规范没有定义.
男人希尔
   /var   This directory contains files which may change in size, such as spool and log files.
   /var/account
          Process accounting logs (optional).
   /var/adm
          This directory is superseded by /var/log and should be a symbolic link to /var/log.
   /var/backups
          Reserved for historical reasons.
   /var/cache
          Data cached for programs.
   /var/cache/fonts
          Locally-generated fonts (optional).
   /var/cache/man
          Locally-formatted man pages (optional).
   /var/cache/www
          WWW proxy or cache data (optional).
   /var/cache/<package>
          Package specific cache data (optional).
   /var/catman/cat[1-9] or /var/cache/man/cat[1-9]
          These directories contain preformatted manual pages according to their man page section.  (The use of preformatted manual pages is deprecated.)
   /var/crash
          System crash dumps (optional).
   /var/cron
          Reserved for historical reasons.
   /var/games
          Variable game data (optional).
   /var/lib
          Variable state information for programs.
   /var/lib/hwclock
          State directory for hwclock (optional).
   /var/lib/misc
          Miscellaneous state data.
   /var/lib/xdm
          X display manager variable data (optional).
   /var/lib/<editor>
          Editor backup files and state (optional).
   /var/lib/<name>
          These directories must be used for all distribution packaging support.
   /var/lib/<package>
          State data for packages and subsystems (optional).
   /var/lib/<pkgtool>
          Packaging support files (optional).
   /var/local
          Variable data for /usr/local.
   /var/lock
          Lock files are placed in this directory.  The naming convention for device lock files is LCK..<device> where <device> is the device's name in the filesystem.  The format used is that  of  HDU
          UUCP lock files, that is, lock files contain a PID as a 10-byte ASCII decimal number, followed by a newline character.
   /var/log
          Miscellaneous log files.
   /var/opt
          Variable data for /opt.
   /var/mail
          Users' mailboxes.  Replaces /var/spool/mail.
   /var/msgs
          Reserved for historical reasons.
   /var/preserve
          Reserved for historical reasons.
   /var/run
          Run-time variable files, like files holding process identifiers (PIDs) and logged user information (utmp).  Files in this directory are usually cleared when the system boots.
   /var/spool
          Spooled (or queued) files for various programs.
    /var/spool
          Spooled (or queued) files for various programs.
   /var/spool/at
          Spooled jobs for at(1).
   /var/spool/cron
          Spooled jobs for cron(8).
   /var/spool/lpd
          Spooled files for printing (optional).
   /var/spool/lpd/printer
          Spools for a specific printer (optional).
   /var/spool/mail
          Replaced by /var/mail.
   /var/spool/mqueue
          Queued outgoing mail (optional).
   /var/spool/news
          Spool directory for news (optional).
   /var/spool/rwho
          Spooled files for rwhod(8) (optional).
   /var/spool/smail
          Spooled files for the smail(1) mail delivery program.
   /var/spool/uucp
          Spooled files for uucp(1) (optional).
   /var/tmp
          Like /tmp, this directory holds temporary files stored for an unspecified duration.
   /var/yp
          Database files for NIS, formerly known as the Sun Yellow Pages (YP).
小智 -24
我想说 /var 中的内容不会经常更改。根据我的经验,它主要用于存储数据库文件、缓存文件,当然还有 /var/www 目录。这些对象确实会发生变化,但例如网站不会每秒都发生变化。