View Single Post

  #10 (permalink)  
Old 03-24-2006
Unruh
 
Posts: n/a
Default Re: tmp files dumping

Robert Hull <Robert@please.do-not-spam.me.uk> writes:

>In comp.os.linux.misc, on Fri 24 March 2006 16:01, Jeremiah DeWitt
>Weiner <jdw@panix.com> wrote:


>> CWO4 Dave Mann <misterfixit@loveable.com> wrote:
>>
>>> Hey Group, I was snooping around my system just now and looked in
>>> the /root/tmp folder. There is stuff in there from months ago. When
>>> does it ever get emptied?

>>
>> I never heard of a /root/tmp directory (not "folder"), although
>> there's nothing impossible about it. /tmp is standard; /root/tmp is


All users have tmp directories which are used by some programs to store
temporary stuff. It never gets emptied by the operating system. It is your
stuff (or root's stuff) so it is up to the user to empty it. Now one could
put in a cron job to do so
For example put in an entry into roots crontab which says

0 4 1 1-12/1 * find /root/tmp -mtime +30 rm \{\} \;
which would delete all items older than 30 days old from /root/tmp at 4AM on
the first day of each month.


>> not. There are about three ways/times in which temp directories get
>> emptied, other than doing it manually:
>> 1. Never.
>> 2. At reboot.


Almost none of the distros do this. But this is usually with reference to
/tmp not to the individual users tmp directories.


>> 3. When something like 'tmpreaper' gets run on a schedule.
>>
>> Exactly which of these might apply depends on your distribution.
>> Personally, I think 'at reboot' is the best way to do it, but
>> reasonable people can and do disagree.
>>

>But some people want to empty /tmp more than every three years


That is what cron is for.

Reply With Quote