tmp files dumping

This is a discussion on tmp files dumping within the Linux General forums, part of the Linux Forums category; Hey Group, I was snooping around my system just now and looked in the /root/tmp folder. There is stuff ...


Go Back   Usenet Forums > Linux Forums > Linux General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-24-2006
CWO4 Dave Mann
 
Posts: n/a
Default tmp files dumping


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?

TIA

Dave




~~~~~~~~~~~~~~~~~~~~~~~~
Study History - Know the Future
Reply With Quote
  #2 (permalink)  
Old 03-24-2006
Jeremiah DeWitt Weiner
 
Posts: n/a
Default Re: tmp files dumping

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

--
Oh to have a lodge in some vast wilderness. Where rumors of oppression
and deceit, of unsuccessful and successful wars may never reach me
anymore.
-- William Cowper
Reply With Quote
  #3 (permalink)  
Old 03-24-2006
Giovanni
 
Posts: n/a
Default Re: tmp files dumping

CWO4 Dave Mann 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?


It is a private directory and gets emptied when you do it.
# rm -rf /root/tmp/*

Ciao
Giovanni
--
A computer is like an air conditioner,
it stops working when you open Windows.
Registered Linux user #337974 <http://counter.li.org/>
Reply With Quote
  #4 (permalink)  
Old 03-24-2006
John-Paul Stewart
 
Posts: n/a
Default Re: tmp files dumping

CWO4 Dave Mann 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?


/root is the personal home directory of the root user. So /root/tmp is
that user's private space and should thus not be automatically emptied
by the system. It's up to you to empty it. There's no requirement that
there be a tmp directory in /root, either.

Of course, /tmp is a different story....
Reply With Quote
  #5 (permalink)  
Old 03-24-2006
CWO4 Dave Mann
 
Posts: n/a
Default Re: tmp files dumping

Jeremiah DeWitt Weiner 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
> not. There are about three ways/times in which temp directories get
> emptied, other than doing it manually:
> 1. Never.
> 2. At reboot.
> 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.
>




Thanks for the insight. I find that I have several directories named /tmp.

/root/tmp
/usr/dave/tmp
/usr/dave/.tmp
/var/.tmp

I don't have a clue, otherwise. I know I never set them up. A couple of
years ago (discussion here I think) I looked into putting the /tmp
directory on a ram drive.

The not being emptied situation has to be corrected. I am parsimonious with
my HD space, even though I have close to a TB of space on several drives.
The cumulative total of all the /tmp directories is almost 3 GB.

TIA!

Dave




~~~~~~~~~~~~~~~~~~~~~~~~
Study History - Know the Future
Reply With Quote
  #6 (permalink)  
Old 03-24-2006
CWO4 Dave Mann
 
Posts: n/a
Default Re: tmp files dumping

Giovanni wrote:

> CWO4 Dave Mann 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?

>
> It is a private directory and gets emptied when you do it.
> # rm -rf /root/tmp/*
>
> Ciao
> Giovanni


--


Thanks for the insight. I find that I have several directories named /tmp.

/root/tmp
/usr/dave/tmp
/usr/dave/.tmp
/var/.tmp

I don't have a clue, otherwise. I know I never set them up. A couple of
years ago (discussion here I think) I looked into putting the /tmp
directory on a ram drive.

The not being emptied situation has to be corrected. I am parsimonious with
my HD space, even though I have close to a TB of space on several drives.
The cumulative total of all the /tmp directories is almost 3 GB.

TIA!

Dave Future
Reply With Quote
  #7 (permalink)  
Old 03-24-2006
Keith Keller
 
Posts: n/a
Default Re: tmp files dumping

On 2006-03-24, CWO4 Dave Mann <misterfixit@loveable.com> wrote:

> Thanks for the insight. I find that I have several directories named /tmp.
>
> /root/tmp
> /usr/dave/tmp
> /usr/dave/.tmp
> /var/.tmp


Are you sure that's not /var/tmp? If you don't have a /var/tmp,
that may not be so good.

> The not being emptied situation has to be corrected. I am parsimonious with
> my HD space, even though I have close to a TB of space on several drives.
> The cumulative total of all the /tmp directories is almost 3 GB.


If you want the situation corrected, just do it. You can use
Giovanni's method for everything above, except possibly /var/tmp;
for that, I'd suggest either something like tmpwatch or to empty
on reboot, since there may be processes using those files that you
don't know about. (tmpwatch on, say, a four-week expiration should
be sufficient to ensure that those older files are not in use. It's
not guaranteed, of course.)

--keith

--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
see X- headers for PGP signature information

Reply With Quote
  #8 (permalink)  
Old 03-24-2006
Robert Hull
 
Posts: n/a
Default Re: tmp files dumping

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
> not. There are about three ways/times in which temp directories get
> emptied, other than doing it manually:
> 1. Never.
> 2. At reboot.
> 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
--
Robert HULL

Archival or publication of this article on any part of thisishull.net
is without consent and is in direct breach of the Data Protection Act
Reply With Quote
  #9 (permalink)  
Old 03-24-2006
Robert M. Riches Jr.
 
Posts: n/a
Default Re: tmp files dumping

On 2006-03-24, 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
> not. There are about three ways/times in which temp directories get
> emptied, other than doing it manually:
> 1. Never.
> 2. At reboot.
> 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.


Somewhere along my sequence from HatRed 8.0, HatRed 9,
MandrX 10.0, MandrX LE2005, and MandrX 2006, I noticed every
user account's home directory (including that for root) had
a $USER/tmp directory. IIRC, these are not automagically
cleaned out (at least on MandrX), so manual cleanup is a
good idea. IIRC, I have these in my exclude file for
backups to avoid wasting space on CDs for them.

--
Robert Riches
spamtrap42@verizon.net
(Yes, that is one of my email addresses.)
Reply With Quote
  #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
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:25 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0