#!/bin/sh -e # clean all crash reports which are older than a week. [ -d /var/crash ] || exit 0 find /var/crash/. ! -name . -prune -type f \( -size 0 -o -mtime +7 \) -exec rm -f -- '{}' \;