Re: centos7 tmpfiles.d deleted outdate files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 05/24/2016 11:18 PM, Qiang Chen wrote:
#Type Path    Mode  UID   GID   Age   Arg
d /chenqiang 0775 root root 10s
f /chenqiang/test_10s 0660 root root 10s
f /chenqiang/test_20s 0660 root root 20s
```

It can delete dir if the age > 10s, but can't delete the files in it.


The man page for tmpfiles.d says, of the age field:
"The age field only applies to lines starting with d, D, and x."

So, the line:

d /chenqiang/test_10s 0660 root root 10s

indicates that systemd-tmpfiles should create the directory /chenqiang/test_10s, owned by root/root with mode 0660, and periodically clean it of files and empty directories more than 10s old.

Note that the default configuration runs systemd-tmpfiles once per day, so specifying time periods much smaller than that may not be useful.

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux