how to clean /tmp at shutdown?

Reindl Harald h.reindl at thelounge.net
Sun May 20 15:40:29 UTC 2012



Am 20.05.2012 17:37, schrieb Smagin Vladimir:
> Hi all. I found that my fedora 16 doesnt clean /tmp at shutdown like any other linux distributions. How I can fix this issue? Using tmpfs is a wrong way.

Fedora handles this with "tmpwatch" and a too large default
you can create your own file with oerrides

no reason to remove ALL from /tmp while shutdown
why do you bother about?

[root at srv-rhsoft:~]$ cat /etc/cron.daily/tmpwatch-rh
#! /bin/sh

flags=-umc
/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix -x /tmp/.font-unix -x /tmp/.ICE-unix -x
/tmp/.Test-unix -X '/tmp/hsperfdata_*' 2d /tmp
/usr/sbin/tmpwatch "$flags" 2d /var/tmp
for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
 if [ -d "$d" ]; then
  /usr/sbin/tmpwatch "$flags" -f 2d "$d"
 fi
done

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20120520/e27e4818/attachment.sig>


More information about the users mailing list