How do I stop /tmp from being wiped out on bootup/shutdown?

Derek Broughton news at pointerstop.ca
Thu Sep 28 13:26:19 UTC 2006


nodata wrote:

> Am Mittwoch, den 27.09.2006, 16:35 -0500 schrieb teicah:
>> -
>> 
> 
> Proper solution:
> 
> Use the correct directory instead, i.e. use /var/tmp
> 
> 
> Wrong solution:
> 
> Try this
>  touch /tmp/.clean

I wonder if that can work on a standard ubuntu system, where /tmp is on a
tmpfs filesystem - /tmp (and /var/run) aren't actually cleaned out on boot,
because the filesystem is recreated fresh each boot.

Another right solution: use hibernate/resume instead of shutdown/restart to
turn off your PC.

Since the dawn of unix (or at least close to it), /tmp has been _temporary_. 
You can't expect those files to survive a reboot, nor should you want them
to.  Once you mess with your system's configuration to prevent /tmp from
being cleaned, it _will_ fill up, sooner or later, with files that really
_are_ temporary.  When /tmp fills up, some apps will start failing.
-- 
derek





More information about the ubuntu-users mailing list