In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of what var refers to in linux, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading what var refers to in this linux. Let's take a look at it.
In linux, var means "changeable", an abbreviation for variable, and is used to store the directory where the data is to be changed when the system is running; the files stored in this directory are often changed and are often used to deploy project program files; usually the size of the directory where the data is located is often changed or expanded.
The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
What does var mean in linux
Variable variable, variable
The files stored in this directory often change (add, modify, delete)
Often used to deploy project program (php) files
/ var includes data to be changed while the system is running. This includes directories where each system is specific, that is, directories that cannot be shared with other computers, such as / var/log,/var/lock,/var/run. Some directories can still be shared with other systems, such as / var/mail, / var/cache/man, / var/cache/fonts,/var/spool/news. The purpose of the existence of the var directory is to extract the files or temporarily generated files and directories that need to be changed or temporarily generated during the operation of the usr directory, so that the usr directory can be mounted read-only. Implicitly requires that the var directory must be mounted in a way that can be read and written.
/ var file system: / var contains data to be changed when the system is generally running. Usually, the size of the directory in which the data is located is often changed or expanded. It turns out that some of the contents of the / var directory are in / usr, but in order to keep the / usr directory relatively stable, put those directories that need to be changed frequently into / var.
Note the following needs through the analysis of the directory
1) the purpose and function of each directory.
2) what information can be obtained from the information in the directory and how to access it.
3) whether the operation of files in the directory is secure.
Expand knowledge:
/ var/account/pact
Purpose: this directory keeps records of processes used in the system. When a process terminates, write a record of each process to a statistical file (pacct or acct). The purpose of process statistics is to provide command usage statistics for basic services in the system. The file can be analyzed through the data tool (sa,ac).
Use: the process statistics subsystem is not activated by default, it must be started. Start the process statistics in the Linux system using the accton command, which must be run as root. The form accton file,file of the accton command must exist first. If it does not exist, use the touch command to create the pacct file: touch / var/log/pacct, then run accton: accton / var/account/pacct. Once accton is activated, you can use the lastcomm command to monitor commands executed at any time in the system. To turn off statistics, you can use the accton command without any parameters.
The contents of the pact file cannot be read directly by cat.
Note: this file will grow a lot and need to be maintained (delete, dump)
/ var/crash
Purpose: the file dumped when the system crashes can be used to analyze the cause of the downmachine.
Use the: crash tool to analyze the files in this directory. Reference documentation linux-2.6.20.6/Documentation/kdump/kdump.txt
Crash-S / boot/System.map-2.6.18-53.el5PAE / boot/vmlinuz-2.6.18-53.el5PAE / var/crash/xxxx
/ var/cache
Purpose: to store the cached data of the application, and the data application stored in this directory can be regenerated, so the loss of data in this directory will not affect the system.
/ var/lib
This directory holds state information about the system or an application while it is running. Users are not allowed to change files in this directory.
/ var/mail
The directory where the mail stores files, linked to / var/spool/mail in CGS. It is explicitly mentioned in the fhs documentation that it is extracted from / var/spool/mail to facilitate the common use of multiple hosts and multiple applications.
/ var/opt
Add-on application stores variables in this directory and static variables in / opt.
/ var/tmp
Temporary files generated by the application can be sorted out regularly. / usr/tmp->.. / var/tmp.
/ var/lock
Many programs follow the convention of generating a locked file in / var/lock to support that they are using a particular device or file. Other programs notice the locked file and will not attempt to use the device or file. Note that the directory cannot be changed casually.
This is the end of the article on "what does var in linux refer to?" Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "what does var refer to in linux". If you want to learn more knowledge, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.