tmpreaper  1.6.17
About: tmpreaper cleans up files in directories based on their age.
  Fossies Dox: tmpreaper_1.6.17.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

tmpreaper Documentation

Some Fossies usage hints in advance:

  1. To see the Doxygen generated documentation please click on one of the items in the steelblue colored "quick index" bar above or use the side panel at the left which displays a hierarchical tree-like index structure and is adjustable in width.
  2. If you want to search for something by keyword rather than browse for it you can use the client side search facility (using Javascript and DHTML) that provides live searching, i.e. the search results are presented and adapted as you type in the Search input field at the top right.
  3. Doxygen doesn't incorporate all member files but just a definable subset (basically the main project source code files that are written in a supported language). So to search and browse all member files you may visit the Fossies tmpreaper_1.6.17.tar.gz contents page and use the Fossies standard member browsing features (also with source code highlighting and additionally with optional code folding).
README
Welcome to tmpreaper.

This package provides a program that can be used to clean out temporary-file
directories.  It recursively searches the directory, refusing to chdir()
across symlinks, and removes files that haven't been accessed in a
user-specified amount of time.  You can specify a set of files to protect
from deletion with a shell pattern.  It will not remove files owned by the
process EUID that have the `w' bit clear, unless you ask it to, much like
`rm -f'.  `tmpreaper' will not remove symlinks, sockets, fifos, or special
files unless given a command line option enabling it to.

WARNING:  Please do not run `tmpreaper' on `/'.  There are no protections
--------  against this written into the program, as that would prevent it
          from functioning the way you'd expect it to in a `chroot(8)'
          environment.

Installation is pretty straightforward. On debian systems, it's best
to simply install the tmpreaper package included with debian.
On others:

- Run "make"

- As root, run "make install".

- You now have tmpreaper installed as /usr/sbin/tmpreaper along with a
  manpage in /usr/share/man/man8/ . If these paths don't agree with you,
  you can change these trivially in the Makefile.

- Create a crontab entry such as the following:

0 4 * * * tmpreaper --mtime-dir --symlinks 7d --protect '/tmp/.X*-{lock,unix,unix/*}' /tmp

  This will run every day at 04:00 AM, cleaning the /tmp directory of files
  not accessed withing 7 days, including symlinks. Empty directories not
  modified in the last 7 days will also be removed. The --protect option
  causes tmpreaper to skip files with matching names. You can supply more
  than one --protect option, and you can supply more than one directory
  to be cleaned.
  Feel free to adjust as you wish; see the manpage for options.  You can use
  the --test option to only show what would be done.


Enjoy,
Paul Slootman <paul@debian.org>         2001/06/02