LoginSignup
11
11

More than 5 years have passed since last update.

/etc/cron.daily/tmpwatchが無い

Last updated at Posted at 2015-07-03

ふと気がついた/etc/cron.daily/tmpwatchが無い

$ rpm -q --changelog tmpwatch
* 月  2月 11 2013 Miloslav Trma? <mitr@redhat.com> - 2.11-3
- Drop the cron.daily script, systemd default configuration handles the same
  places.

systemdで管理するようになったのでcronからは削除されたらしい

/usr/lib/systemd/system/systemd-tmpfiles-clean.timer
/usr/lib/systemd/system/systemd-tmpfiles-clean.service

$ cat /usr/lib/tmpfiles.d/tmp.conf
d /tmp 1777 root root 10d
d /var/tmp 1777 root root 30d

時間が経過したディレクトリは削除されるが
ファイルは削除されないようだ。
ファイルも消したい場合は別途指定が必要な様子。(ただし他の競合もあるので安易に全消しはよくない)

$ ls -l /usr/lib/tmpfiles.d/
合計 64
-rw-r--r-- 1 root root   91  6月 19  2014 abrt.conf
-rw-r--r-- 1 root root   77  7月 23  2014 httpd.conf
-rw-r--r-- 1 root root   39  8月 26  2014 initscripts.conf
-rw-r--r-- 1 root root 1149  7月 31  2014 legacy.conf
-rw-r--r-- 1 root root   34  6月 10  2014 libselinux.conf
-r--r--r-- 1 root root   61  6月 10  2014 lvm2.conf
-rw-r--r-- 1 root root   34  6月 10  2014 mdadm.conf
-rw-r--r-- 1 root root  110  6月 18  2014 pam.conf
-rw-r--r-- 1 root root   22  6月 10  2014 rpm.conf
-rw-r--r-- 1 root root   34  1月 25  2014 saslauthd.conf
-rw-r--r-- 1 root root   62  9月 26  2014 selinux-policy.conf
-rw-r--r-- 1 root root   33  3月  6  2014 svnserve.conf
-rw-r--r-- 1 root root  486  7月 31  2014 systemd-nologin.conf
-rw-r--r-- 1 root root  930  7月 31  2014 systemd.conf
-rw-r--r-- 1 root root  626  7月 31  2014 tmp.conf
-rw-r--r-- 1 root root  623  7月 31  2014 x11.conf
11
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
11