Home  >  Article  >  Operation and Maintenance  >  What does tmp mean in linux

What does tmp mean in linux

藏色散人
藏色散人Original
2023-03-10 09:26:444803browse

In Linux, tmp refers to a folder that stores temporary files. This folder contains temporary files created by the system and users; the default time limit of the tmp folder is 30 days, and it is under tmp that is not accessed for 30 days. The file will be automatically deleted by the system.

What does tmp mean in linux

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

What does tmp mean in linux?

tmp is a folder that stores temporary files, including temporary files created by the system and users. When the system restarts, the files in this directory will be deleted.

With Linux, users can set permissions on directories and files to allow or deny others access to them. The Linux directory adopts a multi-level tree structure. Users can browse the entire system, enter any authorized directory, and access files there.

The interconnectedness of the file structure makes it easy to share data, and several users can access the same file. Linux is a multi-user system. The resident programs of the operating system itself are stored in a dedicated directory starting from the root directory, which is sometimes designated as the system directory. The directories under the root directory in the figure below are system directories.

What does tmp mean in linux

In the Linux system, /tmp is used to store temporary files, and the files inside will be cleared regularly. Next, let’s take a look at the specific content. .

tmp is the abbreviation of temporary. This directory is used to store some temporary files. /tmp is a temporary folder under Linux.

The contents in this folder are generally not deleted. Taking redhat as an example, the default time limit for the system to automatically clean up the

/tmp folder is 30 days. Files under /tmp that are not accessed for 30 days will be automatically deleted by the system.

/tmp - Temporary file directory, which can be accessed by any user and any program. It is generally used to store temporary files of programs, so it should be cleaned regularly. FHS even recommends that all data under /tmp should be deleted when booting, as well as the temporary directory /var/tmp.

Linux has two well-known temporary directories: /tmp and /var/tmp. These two directories are used by users to store temporary files, and are often read and written by programs to store temporary data.

There is no essential difference between the two directories. The most fundamental difference is that the system's default time configuration for file cleaning is inconsistent.

/tmp: The directory clears files that have not been used for 10 days by default. The system restart will clear the directory; the /var/tmp; directory clears files that have not been used for 30 days by default.

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of What does tmp mean in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is linux cc attackNext article:What is linux cc attack