freebsd-dev/etc/periodic/weekly/120.clean-kvmdb
Paul Traina 12c88fdf8b Copy /etc/cron.d to /etc/periodic per-request of many.
This wasn't done with a repository copy because there was no
history of any consequence.  Flames to me.
1997-08-16 17:04:02 +00:00

16 lines
359 B
Bash
Executable File

#!/bin/sh -
#
# $Id: 120.clean-kvmdb,v 1.1.1.1 1997/08/12 17:51:16 pst Exp $
#
if [ -d /var/db -a -x /usr/sbin/sysctl ] ; 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 -exec rm -f -- {} \;
fi