#! /bin/bash

# When beaker sessions are stored in on disk, the files of old and
# expired sessions are not removed automatically. Over time, the file
# system may become full or run out of inodes. The latter is more likely
# in practice because the session files tend to be quite small.  
#
# This script cleans up the directory containing the session files. It
# should be run regularly, preferably as a cron-job run once a day.

find /tmp/data/sessions -type f \! -mtime 0 | xargs --no-run-if-empty rm --
