我正在运行Centos6
,在 mt/tmp/
文件夹中我看到了这些文件
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
我想知道我是否可以删除这些文件或者我如何知道我是否可以删除它们?
答案1
该/tmp
目录用于存放临时文件。程序会在此创建文件不应该依赖于那些文件无限期地保留在那里。所以删除它们通常是安全的。但是你应该确保创建该文件的程序没有仍在运行。否则它可能会对删除做出不友好的反应。
最安全的方法是在系统关闭时清空目录/tmp
。事实上,许多 Linux 发行版都制作了/tmp
RAM 磁盘,因此在关闭时会自动清空。不过 CentOS 6 不属于此类,因此您必须自行设置。