the behavior changed slightly: we now delete any files that have not been accessed in 10 days. The functionality can be tweaked by copying /usr/lib/tmpfiles.d/tmp.conf to /etc/tmpfiles.d/ and editing it there. To learn about the format check out "man tmpfiles.d".
If you wish you could call "/usr/bin/systemd-tmpfiles --clean" from a cronjob every day or so, and it will then delete all files older than 10 days as well (or whatever you configured).
i'm not using any tmpfs because my install is very old and i don't like to worry about ram everytime i copy something to /tmp.
Now i've in /tmp a file from june, something isn't working?
Going to try tmp.conf ...
-edit
For some reason the access time of all of my files in /tmp is set to the time i boot the system, so it never get cleared.
Seems:
D /tmp 1777 root root
will mimic the old behaviour
]]>I have some other entries in fstab which I'm not sure about; I checked the latest fstab and it only has tmpfs; can anyone say if these entries are actually required?
devpts /dev/pts devpts defaults 0 0 shm /dev/shm tmpfs nodev,nosuid 0 0
They are not needed. Only add them if you want to override the standard mount options we use in initsctipts/systemd.
]]>devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0
EDIT: I just have tested another machine and indeed /tmp was not mounted as tmpfs (as I incorrectly believed)!. Well, time to do it...
]]>If you wish you could call "/usr/bin/systemd-tmpfiles --clean" from a cronjob every day or so, and it will then delete all files older than 10 days as well (or whatever you configured).
]]>mgmartins wrote:I've /tmp as a root folder and not as a partition.
So you've modified the default scripts and made tmp as a dir on a physical disk... Why would you expect it to clear on a reboot?
If i am not mistaken, /tmp used to be cleared on every reboot, even before migration to tmpfs.
]]>I've /tmp as a root folder and not as a partition.
So you've modified the default scripts and made tmp as a dir on a physical disk... Why would you expect it to clear on a reboot?
]]>