在Linux系统中/tmp文件夹下的文件是会被清理、删除的,文件清理的规则是如何设定的呢? 以Redhat为例,这个主要是因为作业里面会调用tmpwatch命令删除那些一段时间没有访问的文件。

 

那么什么是tmpwatch呢?其实tmpwatch是一个命令或者说是一个包。如下所示

tmpwatch - removes files which haven’t been accessed for a period of time

[root@DB-Server ~]# rpm -qa | grep tmpwatch
tmpwatch-2.9.7-1.1.el5.5
[root@DB-Server ~]# whereis tmpwatch
tmpwatch: /usr/sbin/tmpwatch /usr/share/man/man8/tmpwatch.8.gz
[root@DB-Server ~]# file /usr/sbin/tmpwatch 
/usr/sbin/tmpwatch: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
[root@DB-Server ~]# 

相关文章:

  • 2021-08-29
  • 2022-01-28
  • 2022-12-23
  • 2022-01-12
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
  • 2021-04-03
猜你喜欢
  • 2022-12-23
  • 2021-07-15
  • 2021-12-24
  • 2022-01-20
相关资源
相似解决方案