tmpfiles: extend "Age" to accept an "age-by" argument
For "systemd-tmpfiles --cleanup", when the "Age" parameter is specified, the criteria for deletion is determined from the path's last modification timestamp ("mtime"), its last access timestamp ("atime") and its last status change timestamp ("ctime"). For instance, if one of those paths to be cleaned up are opened, it results in the modification of "atime", which results file system entry to not be removed because the default aging algorithm would skip the entry. Add an optional "age-by" argument by extending the "Age" parameter to restrict the clean-up for a particular type of file timestamp, which can be specified in "tmpfiles.d" as follows: [age-by:]cleanup-age, where age-by is "[abcmACBM]+" For example: d /foo/bar - - - abM:1m - Would clean-up any files that were not accessed and created, or directories that were not modified less than a minute ago in "/foo/bar". Fixes: #17002
Loading
Please register or sign in to comment