#!/bin/sh # This script will find all MySQL databases modified within the last 90 days export SEARCHPERIOD="90" export DBPATH="/var/lib/mysql/" find $DBPATH -mtime -$SEARCHPERIOD -type f -exec dirname {} \; | replace $DBPATH "" | uniq