Hi,
I am trying to configure /tmp as part of tmpfiles.d, so that files are automatically deleted over time.
The /tmp is created when I start the service:
# df -h /tmp
Filesystem Size Used Avail Use% Mounted on
tmpfs 7.7G 48K 7.7G 1% /tmp
Next I looked at the automatic cleanup. As I understand the following lines starts the /tmp and removes files with a/c/mtime older then 10d:
v /tmp 1777 root root 10d
Now I want to remove certain directories/files within /tmp when with a different age (say 1d). In the man page I found the following:
r
Remove a file or directory if it exists. This may not be used to remove non-empty directories, use R for that. Lines of this type accept shell-style globs in place of normal path names.
R
Recursively remove a path and all its subdirectories (if it is a directory). Lines of this type accept shell-style globs in place of normal path names.
So I though it would be something like this:
R /tmp/OraInstall* - - - 1d
or
R /tmp/OraInstall* - oracle dba 1d
But that doesnot work.
When I start the cleanup manually:
SYSTEMD_LOG_TARGET=console SYSTEMD_LOG_LEVEL=debug /usr/bin/systemd-tmpfiles --clean
I get a couple of message in the output like:
Ignoring "/tmp/OraInstall2017-06-21_07-15-56PM": a separate glob exists.
And later in the output:
Running clean action for entry R /tmp/OraInstall*
But I doesnot cleanup the /tmp/OraInstall* directories.
Any one an idea what I doing wrong ? Or isnot this possible ?
Regards,
Pascal
PS I attached my tmp.conf and the output of my last test(output.txt)