HardenedBSD/etc/periodic/weekly/120.clean-kvmdb
Joerg Wunsch 0e20a72001 Finally remove the ancient `-exec rm -f {} ;' cruft that used to be
used to cleanup old files, and replace it by -delete which has been
present in our find(1) for ages now.
1999-03-21 12:34:06 +00:00

16 lines
319 B
Bash
Executable File

#!/bin/sh -
#
# $Id: 120.clean-kvmdb,v 1.2 1998/01/01 09:04:47 bde Exp $
#
if [ -d /var/db ] ; then
echo ""
echo "Cleaning up kernel database files:"
kernel=`sysctl -n kern.bootfile`
kernel=kvm_`basename ${kernel}`.db
find /var/db -name "kvm_*.db" -a ! -name ${kernel} -a \
-atime +7 -delete
fi