Home >System Tutorial >LINUX >How to access and clean junk files in /tmp directory in CentOS 7?

How to access and clean junk files in /tmp directory in CentOS 7?

WBOY
WBOYforward
2023-12-27 21:10:111054browse

There is a lot of garbage in the tmp directory in the centos7 system. If you want to clear the garbage, how should you do it? Let’s take a look at the detailed tutorial below.

To view the list of files in the tmp file directory, execute the command cd tmp/ to switch to the current file directory of tmp, and execute the ll command to view the list of files in the current directory. As shown below.

How to access and clean junk files in /tmp directory in CentOS 7?

Use the rm command to delete files. It should be noted that the rm command deletes files from the system forever. Therefore, it is recommended that when using the rm command, it is best to delete the file. Prompt beforehand. Use the command rm -i file name, wait for the user to confirm deletion (y) or skip deletion (n), and the system will perform corresponding operations. As shown below.

How to access and clean junk files in /tmp directory in CentOS 7?

The above is the detailed content of How to access and clean junk files in /tmp directory in CentOS 7?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete