On 2014-06-23 16:29, Dylan wrote:
On 23/06/14 14:27, Rodney Baker wrote:
On Sat, 21 Jun 2014 22:18:57 C wrote:
What is the "right" way to clean up /tmp? [...]
Mount /tmp as a RAM disk (use type tmpfs). That way it starts clean every time the machine boots up.
My current uptime is 29 days, so it would not work.
Works for me...
But not for everyone... I, for example, use 3d animation software which generates literally thousands of temporary files per frame while running pre-rendering physics simulations and the like. This can amount to tens of megabytes for a moderately complex scene of 250 frames (25 seconds.) The software is very good at garbage collection, so they don't hang around once the simulation is completed and "baked", but they have to go to disk not memory while they are needed... It can also take several /days/ to "bake" and render a scene so being able to set a, say, 10-day age limit on /tmp is quite important here.
Right. There are many applications that can generate huge amounts of temporary files, and only some can be redirected to another directory. For instance, YaST backup (try telling it to do full backup of a large home). It could be an option if you could set separately a size, and how much of it actually goes on RAM. Then I could set it happily for maximun size of 10 GiB, and maximum RAM usage of just 100 M. The rest would have to overflow to swap, or to some other disk space. Some download utilities download first to "/tmp". Even Firefox does so sometimes. If you are downloading for some hours, and the machine crashes or power fails, I would not be happy to find those files gone. Some applications can recover from interruptions, but not if tmp is volatile... -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)