var/tmp

Eric McCoy emccoy at haystacks.org
Sun Mar 13 22:02:23 PST 2005


dick hoogendijk wrote:
> I'd like some info on:
> 
> man 7 hier:
> "/var/tmp tempory files that are kept between system reboots"
> 
> Can I safely delete this directory. Probabl not 'cause it's kept in
> between, but how can I weed some files then in a safe manner? What can
> and what cannot be deleted and why? some info poiters would be welcome
> ;-)

The hierarchy rules apply to the system, not to you.  You can ignore or 
honor them at your discretion.  The promise that nothing in /var/tmp 
will be deleted between reboots only means that the system itself won't 
do it.  It's a temporary directory; if there's a file in there that 
hasn't been touched in four weeks, by all means delete it.

What I typically do with temp files of uncertain origin is move them 
into a subdirectory (and then reboot to make sure no processes are 
holding them open).  If nothing bitches that Some Important File is 
missing, trash them.  But if some program refuses to start or gives 
errors, then you have the originals to move back into place.



More information about the freebsd-questions mailing list