Empty /tmp when shutting down

Christopher K. Johnson ckjohnson at gwi.net
Wed Feb 25 11:56:26 UTC 2004


Robert Vangel wrote:

> You could create a init script in rc6.d and rc0.d which does an
>
> rm -rf /tmp/* /tmp/.*
>
> I don't think it has one built in though
>
> Coume - Lubox.com wrote:
>
>> Hello,
>> Is it possible to empty the /tmp directory when I shutdown my laptop?
>> If I remember well, I was doing that under MDK but I cannot remember how
>> :/
>>
>> Thxs in advance
>> Ludo
>
Better yet - check out tmpwatch.  And there is a daily cron job which 
cleans out temporary files more than a certain number of hours old.  See 
/etc/cron.daily/tmpwatch and edit the times there if you want to delete 
them sooner.  In any case there is a mechanism to delete old temp files 
and that is where it is controlled.  So you could do nothing and know 
that the /tmp files will be deleted in 10 days.

Chris

-- 
-----------------------------------------------------------
   "Spend less!  Do more!  Go Open Source..." -- Dirigo.net
   Chris Johnson, RHCE #807000448202021






More information about the fedora-list mailing list