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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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/> |
|
|||
|
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.... |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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.) |
|
|||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|