[conspire] tmpreaper and use of /tmp as scratch space (was: Install openscad)
Rick Moen
rick at linuxmafia.com
Sat Jul 7 14:36:57 PDT 2018
I should correct some potentially misleading wording:
> Absent volatile-storage issues, files left in /tmp/ will
> stick around indefinitely _unless_ there's a boot script to clean out
> old files at startup, and/or a system maintenance script or other type
^^^
> of utility running to periodically remove old, not-recently-touched
> files from it.
Further down, I also used the phrase 'unused files'. In both cases, I
really should have used the term 'unaccessed files'.
I tried really hard to not get lost in the weeds of Unix minutiae, but
this is probably worth covering, just a bit: Both tmpreaper and the
system reboot scripts rely on the 'atime' time stamp, which you can
think of as access time. Absent special situations, atime is one of
three time stamps kept concerning all files, and gets updated if, e.g.,
you do an 'ls' of the directory containing the file, and not _just_ if
you modify the file's contents. Here is a brief rundown on the three
timestamps: http://kerolasa.github.io/filetimes.html
The point is, as long as I've done at least 'ls' on a file stored
inside /tmp within the last 30 days (on my system the way I've
configured its retention period), that file won't be reaped even if
its contents have been unchanged.
More information about the conspire
mailing list