Quoting Walter Faleiro (curtorkar at gmail.com):
> The rc.sysinit has this
> # Do we need (w|u)tmpx files? We don't set them up, but the sysadmin
> might...
> [ -f /var/run/utmpx -o -f /var/log/wtmpx ] && _NEED_XFILES=1
> # Clean up utmp/wtmp
> >/var/run/utmp
> touch /var/log/wtmp
> chgrp utmp /var/run/utmp /var/log/wtmp
> chmod 0664 /var/run/utmp /var/log/wtmp
> > /var/run/utmpx
> touch /var/log/wtmpx
> chgrp utmp /var/run/utmpx /var/log/wtmpx
> chmod 0664 /var/run/utmpx /var/log/wtmpx
> rm -f /tmp/.X*-lock
> rm -rf /tmp/.X*-unix
> rm -rf /tmp/.ICE-unix
> rm -f /tmp/.s.PGSQL.*
>> So I understand an extra line shoud go rm -rf /tmp/*
>> Not sure why they left it out.
Probably because the daily tmpreaper cronjob actually meets people's
needs in general more than well enough, and the above list is exactly
the cruft that really _should_ be cleaned out during boot-up, lest
problems in it interfere with X11.
Frankly, I really hate it when any *IX simply clobbers /tmp's contents
completely for no better reason than booting. I like to keep my
short-term files there, and it's really vexing to lose them I forgot to
make allowance for it being one of _those_ *IXes and took special steps
to grab my files before the system could blow them away.
If you do decide to emphatically blow away /tmp contents, be aware that
"rm -rf /tmp/*" is nowhere near complete, as it misses all files and
directories whose names start with dot. You can overcome this
omission, but be very careful. E.g., do _not_ do "rm -rf /tmp/.?*" as
root, or today's be the day you get to test your ability to restore from
backup.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!