首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从/tmp/ CentOS6删除文件

从/tmp/ CentOS6删除文件
EN

Server Fault用户
提问于 2022-10-04 10:44:02
回答 1查看 239关注 0票数 0

我正在运行Centos6,在mt /tmp/文件夹中我看到了这些文件

代码语言:javascript
复制
drwxr-xr-x.  2 root root       4096 Jan 14  2016 fileinstall-1059639640221211034
drwxr-xr-x.  2 root root       4096 Jan 30  2021 fileinstall--1088700727245300865
drwxr-xr-x.  2 root root       4096 May  8  2021 fileinstall-1103275592857423187
drwxr-xr-x.  2 root root       4096 Nov 27  2013 fileinstall--1136663737066394217
drwxr-xr-x.  2 root root       4096 Oct 29  2013 fileinstall--1159993482611477590
drwxr-xr-x.  2 root root       4096 Sep 20  2015 fileinstall--1179645354920264553
drwxr-xr-x.  2 root root       4096 Oct 31  2014 fileinstall-122712582343751236
drwxr-xr-x.  2 root root       4096 May  6  2019 fileinstall--1421070942165881283
drwxr-xr-x.  2 root root       4096 Feb 20  2021 fileinstall--1778997120093675509
drwxr-xr-x.  2 root root       4096 Sep 30  2021 fileinstall-1853904966015687965
drwxr-xr-x.  2 root root       4096 Feb  2  2021 fileinstall--204359382451416977
drwxr-xr-x.  2 root root       4096 Nov 30  2021 fileinstall--2063084550731465366
drwxr-xr-x.  2 root root       4096 Jan 28  2021 fileinstall--2089002648208375729
drwxr-xr-x.  2 root root       4096 Oct 24  2013 fileinstall-2187331466680579249
drwxr-xr-x.  2 root root       4096 Oct 22  2013 fileinstall--2590570383770241952
drwxr-xr-x.  2 root root       4096 Jul 29  2016 fileinstall-2819564663497542969
drwxr-xr-x.  2 root root       4096 Nov  5  2021 fileinstall-2835020095656193300
drwxr-xr-x.  2 root root       4096 Sep 17  2014 fileinstall-2943946855848024991
drwxr-xr-x.  2 root root       4096 May  8  2021 fileinstall-3055010024006600680
drwxr-xr-x.  2 root root       4096 Nov  7  2014 fileinstall-3158184956014033312
drwxr-xr-x.  2 root root       4096 Oct 22  2013 fileinstall--3224061972261049326
drwxr--r--.  2 root root       4096 Jun 27  2019 tmp00000e8b
drwx------.  2 root root       4096 Dec 16  2021 tmp.A3Q7aY7gYr
drwxr-xr-x.  2 root root       4096 Oct 29  2013 vmware-config0
drwxr-xr-x.  2 root root       4096 Jan 25  2016 vmware-config1
drwxr-xr-x.  2 root root       4096 Oct 29  2013 vmware-fonts0
drwxr-xr-x.  2 root root       4096 Jan 25  2016 vmware-fonts1
drwxr--r--.  2 root root       4096 Jan 14  2021 vmware-root
drwx------.  2 root root       4096 Oct  4 06:27 vmware-root-4282170909
-rw-r--r--.  1 root root          0 Oct 18  2013 yum.log
-rw-r--r--.  1 root root      97065 Jan 25  2016 yum_save_tx-2016-01-25-09-57NLmfCx.yumtx

我想知道我是否可以删除这些文件,或者如何知道我是否可以删除它们?

EN

回答 1

Server Fault用户

发布于 2022-10-04 12:01:43

/tmp目录用于临时文件。在那里创建文件的程序不应该无限期地依赖那些文件。因此,删除它们通常是安全的。但是,您应该确保创建该文件的程序没有继续运行。否则,它可能会对搬迁做出不友善的反应。

最安全的方法是在系统关闭期间清除/tmp目录。事实上,许多Linux发行版使/tmp成为一个RAM磁盘,因此它在关闭时会自动清空。不过,CentOS 6并不是其中之一,所以您必须自己设置一些东西。

票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1112214

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档