Fedora 18 now cleans /tmp but has substituted /var/tmp for system work which does not get cleaned ever as far as I can see.
The following one-liner can be put in a root crontab (suggested to run weekly - say Sunday 2am) and/or put in /etc/rc.d/rc.local - whichever suits you (if you boot often, the latter is enough, if you never boot then you need a crontab entry). It removes files and directories over one day old.
/bin/find /tmp /var/tmp -mtime +1 -exec /bin/rm -rf {} \;
Personally as I boot often, it is part of rc - and works VERY well. I use crontab entries for servers that "never" reboot.
Itt is best to use full path names for things root does SO please don't shorten the executable names.
The following one-liner can be put in a root crontab (suggested to run weekly - say Sunday 2am) and/or put in /etc/rc.d/rc.local - whichever suits you (if you boot often, the latter is enough, if you never boot then you need a crontab entry). It removes files and directories over one day old.
/bin/find /tmp /var/tmp -mtime +1 -exec /bin/rm -rf {} \;
Personally as I boot often, it is part of rc - and works VERY well. I use crontab entries for servers that "never" reboot.
Itt is best to use full path names for things root does SO please don't shorten the executable names.