Computer and IT knowledge - things to know
> use this script: deleteOldrrdFilesFromCheckmkSite.sh
#!/bin/bash
site=yoursitename
find /omd/sites/$site/var/pnp4nagios/ -mtime +30 |grep rrd$
while true; do
read -p "should I really delete all the files shown above (y/n) ?" yn
case $yn in
[Yy]* ) echo "delete files"; find /omd/sites/$site/var/pnp4nagios/ -mtime +30 |grep rrd$ |xargs -n 1 rm; break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
computer2know :: thank you for your visit :: have a nice day :: © 2024