[Nix-dev] Re: Cleaning `/tmp' at boot time

Ludovic Courtès ludo at gnu.org
Wed Oct 29 17:46:39 CET 2008


Hi,

Eelco Dolstra <e.dolstra at tudelft.nl>
writes:

> But as Marc pointed out, on a long-running system you still need to do that.  So
> you're better off cleaning /tmp from a cronjob.  Also, on a long-running system,
> once you *do* reboot, the boot time increases a lot (on my laptop it took a few
> minutes to delete /tmp).

Right, but don't forget the risks currently taken in the presence of
bind mounts under /tmp.

> In any case, the current command to delete it:
>
>   rm -rf --one-file-system /tmp/*
>
> is broken.  It will fail / do bad things if there are too many files or files
> starting with "-" in /tmp.  Better to do "find /tmp ... -print0 | xargs -0 rm --
> ..." or something.

Right, but that's another story.

It looks to me that there's no compelling argument to leave `/tmp'
untouched across reboots.

Thanks,
Ludo'.




More information about the nix-dev mailing list