/tmp files deleted periodically by system

/tmp files deleted periodically by system

Post by Alex » Sat, 14 Dec 2002 04:55:07



I use the /tmp directory for holding misc stuff ... but I don't
necessarily want everything in there deleted every couple of days. Red Hat
8.0 seems to do this.

Is there any way I can change this behavior ? I exepcted to see something
in crontab (crontab -l) but there was nothing there !

Thanks
-Alex

--
For email, replace ZERO with the number zero.

 
 
 

/tmp files deleted periodically by system

Post by Bill Unr » Sat, 14 Dec 2002 05:02:01


]I use the /tmp directory for holding misc stuff ... but I don't
]necessarily want everything in there deleted every couple of days. Red Hat
]8.0 seems to do this.

/tmp is for short term temporary stuff. If you do not want it to be
temporary, set up another file system for your stuff. To try to change
the use of the standard filesystem directories will mean you will be
fighting the world for the rest of your life. Is it worth it?

Anyway, look in /etc/cron*

]Is there any way I can change this behavior ? I exepcted to see something
]in crontab (crontab -l) but there was nothing there !

]Thanks
]-Alex

]--
]For email, replace ZERO with the number zero.

 
 
 

/tmp files deleted periodically by system

Post by Lew Pitch » Sat, 14 Dec 2002 05:08:16



>I use the /tmp directory for holding misc stuff ...

Bad move. That's not what /tmp is for.

/tmp is for holding _temporary_ files; files that can be deleted by the system
at arbitrary points in time.

Quote:> but I don't
>necessarily want everything in there deleted every couple of days. Red Hat
>8.0 seems to do this.

Yup. RH is working properly.

Quote:>Is there any way I can change this behavior ? I exepcted to see something

Yes. Move your 'misc' files to some other directory.
Otherwise, you can disable the crontab (may be a .daily or .weekly job) that
cleans out /tmp. Beware, though, as this can cause space problems as *everybody
else* uses /tmp for temporary files, and expects that the system will clean out
/tmp periodically.

Quote:>in crontab (crontab -l) but there was nothing there !

>Thanks
>-Alex

>--
>For email, replace ZERO with the number zero.

Lew Pitcher
IT Consultant, Development Services
Toronto Dominion Bank Financial Group

(Opinions expressed are my own, not my employers')

 
 
 

/tmp files deleted periodically by system

Post by Paul Lutu » Sat, 14 Dec 2002 06:08:28



> I use the /tmp directory for holding misc stuff ... but I don't
> necessarily want everything in there deleted every couple of days. Red
> Hat 8.0 seems to do this.

> Is there any way I can change this behavior ? I exepcted to see
> something in crontab (crontab -l) but there was nothing there !

YEs, there is an easy solution -- NEVER USE /tmp FOR ANYTING YOU NEED TO
PRESERVE. THAT IS NOT ITS PURPOSE.

SOLUTION: USE ... SOME ... OTHER ... DIRECTORY.

Christ almighty.

--
Paul Lutus
http://www.arachnoid.com

 
 
 

/tmp files deleted periodically by system

Post by Markku Kolkk » Sat, 14 Dec 2002 08:37:19



> I use the /tmp directory for holding misc stuff ... but I don't
> necessarily want everything in there deleted every couple of days. Red Hat
> 8.0 seems to do this.

According to FHS (http://www.pathname.com/fhs/) you can't assume that
files in /tmp stay there after the program that created the file has
exited. It's for _really_ temporary files.

Quote:> Is there any way I can change this behavior ?

Change your own behavior, use /var/tmp or your own home directory
instead.

Quote:> I exepcted to see something
> in crontab (crontab -l) but there was nothing there !

"tmpwatch" is run from /etc/cron.daily. Don't disable it.

--
        Markku Kolkka

 
 
 

/tmp files deleted periodically by system

Post by alex » Sat, 14 Dec 2002 08:43:13


AlexH shorted the keyboard with drool and:

Quote:> I use the /tmp directory for holding misc stuff ... but I don't
> necessarily want everything in there deleted every couple of days. Red Hat
> 8.0 seems to do this.

LOL. On debian, it hoses /tmp at boot. I would prefer it if debian cleaned
out /tmp at shutdown, that way /tmp wouldn't get clean if you crashed and
rebooted.

alexd

--
http://www.troffasky.pwp.blueyonder.co.uk/pix/
AIM:troffasky
Knives and guns are dangerous,
They don't want to play with us

 
 
 

/tmp files deleted periodically by system

Post by Tony » Sat, 14 Dec 2002 09:27:20


I don't like anything going on behind my back and deleting files from
tmp is one of them. Another annoying thing is updatedb going off, it
taxes your resources quite a bit and many distros have it going off
daily. What else do out of the box distros do behind one's back?
Trim log files, run delete other files in /var/* ...?

-Tony

Quote:>> I use the /tmp directory for holding misc stuff ... but I don't
>> necessarily want everything in there deleted every couple of days. Red Hat
>> 8.0 seems to do this.

> LOL. On debian, it hoses /tmp at boot. I would prefer it if debian cleaned
> out /tmp at shutdown, that way /tmp wouldn't get clean if you crashed and
> rebooted.

> alexd

 
 
 

/tmp files deleted periodically by system

Post by Bruce Stephen » Sat, 14 Dec 2002 09:48:45



> AlexH shorted the keyboard with drool and:

>> I use the /tmp directory for holding misc stuff ... but I don't
>> necessarily want everything in there deleted every couple of days. Red Hat
>> 8.0 seems to do this.

> LOL. On debian, it hoses /tmp at boot. I would prefer it if debian cleaned
> out /tmp at shutdown, that way /tmp wouldn't get clean if you crashed and
> rebooted.

In Debian, the file /etc/tmpreaper.conf controls this, normally,
anyway.
 
 
 

/tmp files deleted periodically by system

Post by Dave Bro » Sat, 14 Dec 2002 10:03:01



> I use the /tmp directory for holding misc stuff ... but I don't
> necessarily want everything in there deleted every couple of days. Red Hat
> 8.0 seems to do this.

> Is there any way I can change this behavior ? I exepcted to see something
> in crontab (crontab -l) but there was nothing there !

If you look in /etc/cron.daily/tmpwatch, you might notice that both /tmp
and /var/tmp are cleaned out, but on different deadlines, (10 days and 30
days).

I won't encourage you to use /tmp as a stash for stuff you want to save
for some indeterminate time, but I admittedly download rpms and such
there, and then sometimes decide to hold off installing them immediately.  

tmpwatch operates (by default) on 'access time', (i.e., read or
written).  So if there's a category of files, say, rpm, that you
haven't gotten around to using yet, and wanted to extend their life
in /tmp, you could:

    touch -a *rpm

On the other hand, you do have 10 days--quit procrastinating!

PS: Sometimes I think about adding my home directory to tmpwatch.

--
Dave Brown  Austin, TX

 
 
 

/tmp files deleted periodically by system

Post by Ken Bloo » Sat, 14 Dec 2002 10:12:09




>> AlexH shorted the keyboard with drool and:

>>> I use the /tmp directory for holding misc stuff ... but I don't
>>> necessarily want everything in there deleted every couple of days. Red Hat
>>> 8.0 seems to do this.

>> LOL. On debian, it hoses /tmp at boot. I would prefer it if debian cleaned
>> out /tmp at shutdown, that way /tmp wouldn't get clean if you crashed and
>> rebooted.

> In Debian, the file /etc/tmpreaper.conf controls this, normally,
> anyway.

I kind of prefer it the way it is. Back when I ran mandrake, if I
crashed and burned, my lockfiles wouldn't get cleared out and some of my
daemons would refuse to start up again.
 
 
 

/tmp files deleted periodically by system

Post by John Hasle » Sat, 14 Dec 2002 10:09:12


Quote:Tony writes:
> I don't like anything going on behind my back and deleting files from tmp
> is one of them.

You might want to consider going back to MSDOS, then.  Personally, I want
as many things as possible going on "behind my back".  Automating
repetitive tasks is one of the things computers are for.

Quote:> What else do out of the box distros do behind one's back?

Exactly what you told them to do when you installed them.  Read the docs
and find out.
--
John Hasler

Dancing Horse Hill
Elmwood, WI
 
 
 

/tmp files deleted periodically by system

Post by Erik Max Franci » Sat, 14 Dec 2002 10:56:16



> I use the /tmp directory for holding misc stuff ... but I don't
> necessarily want everything in there deleted every couple of days. Red
> Hat
> 8.0 seems to do this.

> Is there any way I can change this behavior ? I exepcted to see
> something
> in crontab (crontab -l) but there was nothing there !

In short, you shouldn't change this behavior.  /tmp, as the name even
suggests, is explicitly for temporary stuff.  It shouldn't be used for
stuff that you want to stick around.  Instead put your important stuff
somewhere else.

--

 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ There is _never_ no hope left.  Remember.
\__/ Louis Wu
    Erik Max Francis' bookmarks / http://www.alcyone.com/max/links/
 A highly categorized list of Web links.

 
 
 

/tmp files deleted periodically by system

Post by Paul Lutu » Sat, 14 Dec 2002 11:23:01



> I don't like anything going on behind my back

Each and every bit of your dynamic RAM memory is reset millions of times per
second! Doesn't this make you go *ing CRAZY???? Imagine all those
delinquent electrons, racing around without asking your permission. It's
enough to make you want to buy an abacus, isn't it?

Quote:> and deleting files from
> tmp is one of them. Another annoying thing is updatedb going off, it
> taxes your resources quite a bit and many distros have it going off
> daily.

You must go crazy every day at 4:04 AM, sitting in front of your computer
as updatedb fires off.

Quote:> What else do out of the box distros do behind one's back?

They do all the things you can't imagine. That is a long list.

Quote:> Trim log files, run delete other files in /var/* ...?

As a matter of fact, yes, The program "logrotate" rearranges log files so
no single one gets too large, but IT DOES THIS WITHOUT ASKING YOU! The
nerve!

--
Paul Lutus
http://www.veryComputer.com/

 
 
 

/tmp files deleted periodically by system

Post by Christopher Brown » Sat, 14 Dec 2002 12:58:27





>>> AlexH shorted the keyboard with drool and:

>>>> I use the /tmp directory for holding misc stuff ... but I don't
>>>> necessarily want everything in there deleted every couple of
>>>> days. Red Hat 8.0 seems to do this.
>>> LOL. On debian, it hoses /tmp at boot. I would prefer it if debian
>>> cleaned out /tmp at shutdown, that way /tmp wouldn't get clean if
>>> you crashed and rebooted.
>> In Debian, the file /etc/tmpreaper.conf controls this, normally,
>> anyway.
> I kind of prefer it the way it is. Back when I ran mandrake, if I
> crashed and burned, my lockfiles wouldn't get cleared out and some
> of my daemons would refuse to start up again.

.. Which is probably bad configuration on their part, but I suppose
that's pretty disputable.

It probably should be made a little clearer just what the basis is for
clearing data out of /tmp, as people tend to have only the vague
notion that "the system is liable to clear files out at just about any
time," which seems rather capricious.

The Debian approach of clearing /tmp out at bootup does occur with
some other systems, and is certainly consistent with the message:
  "If it's on /tmp, it's _TEMPORARY_ !!!"

Along with that "mass cleanout," there are a number of common
approaches:

 -> Never nuke anything; /tmp gets emptied at boot time;

 -> Clear /tmp at /shutdown/ time;

 -> A daemon goes through daily and gets rid of files not accessed
    within [some time period].

Strangely enough, most distributions do have /some/ automated scheme
for purging this sort of stuff.  They also typically have some scheme
for rotating logs...
--

http://cbbrowne.com/info/oses.html
Are you pondering what I'm pondering?

 
 
 

/tmp files deleted periodically by system

Post by J?rn Dahl-Stamn » Sat, 14 Dec 2002 17:53:37




>> I don't like anything going on behind my back

>Each and every bit of your dynamic RAM memory is reset millions of times per
>second! Doesn't this make you go *ing CRAZY???? Imagine all those
>delinquent electrons, racing around without asking your permission. It's
>enough to make you want to buy an abacus, isn't it?

Which linux version works on an abacus? ;-)

J?rn Dahl-Stamnes, EDB Teamco AS

web: http://www.veryComputer.com/

 
 
 

1. find /tmp -atime +1 | rm does not delete my old tmp files :-(

I would like to delete all files in /tmp that have not been accessed in
one day, so i tried this (as root):
        find /tmp -atime +1 | rm
This fails with:
        rm: too few arguments
        Try `rm --help' for more information.
find /tmp -atime +1 does indeed give me a list of files not accessed in 24
hours.
I have tried alot of variations and have tried to use the -exec option of
find, all to no avail.  Please help me to automate the deletion of all tmp
files as i know that it can be done.
As rm receices input from stdin i thought that a redirect would not be a
problem, but it is.
I am using Linux with Gnu find and Gnu rm.
I have RTFM, and can't find anything on this.
TIA for any help,
        -Robert


                     WWW: http://student.uq.edu.au/~ec531667

2. apsfilter (7.2.1) take a long time to print (or not printing at all)

3. Deleting a log file periodically

4. ispell for Solaris 2.x?

5. clear /tmp periodically?

6. Uninstalling LILO

7. clearing /tmp periodically

8. Where to install apps on Linux system?

9. /tmp disappears periodically

10. clearing /tmp periodically

11. delete of -ksh.log file in /tmp directory

12. Deleting files in /var/tmp

13. Can I delete all files in /tmp directory?