[GRASSLIST:4564] Re: .tmp files

Glynn Clements glynn.clements at virgin.net
Mon Sep 23 22:01:45 EDT 2002


Gordon Keith wrote:

> > The ".tmp" directory should get cleaned whenever you exit a GRASS
> > session.
> >
> > If your ".tmp" directories are accumulating files, that suggests that
> > GRASS sessions are being terminated abnormally, e.g. by killing the
> > xterm. Always terminate the session by typing "exit" in the shell.
> 
> OK.
> 
> It's probably my fault then.
> 
> I've been using g.gisenv set= to swap better mapsets and locations a lot 
> rather than having to exit and restart grass several times a day. I 
> guess this is one of the gotchas of doing that.

OK; yes, the other reason why temporary files may accumulate is if you
have long-running sessions. Until recently this seldom happened, as
you had to quit in order to change the location or mapset.

Either terminate the session at the end of the day, or manually run
$GISBASE/etc/clean_temp occasionally. Unfortunately, this can't be
automated, as a few programs expect temporary files to survive for a
while after the program which created them has terminated.

Mostly this is due to either:

a) a program creating a temporary file, then running some other
program with that temporary file as input.

b) d.text, which saves its input in a temporary file; this file needs
to remain until the monitor is erased, as it will be used if the
monitor needs to be redrawn (either via d.resize/d.redraw or, for
XDRIVER, if the monitor is resized via the window manager).

Apart from that, I suspect that a lot of programs need to take more
care to remove temporary files once they are no longer needed.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-user mailing list