Shell Script, delete last 30 day's records from system.
#!/bin/bash
# Delete log files older than 30 days in this script.
find /var/log/tomcat7/localServer/logs/ -mtime +30 -type f -delete
echo "-----------------------------------------------------"
echo "$(date)"
echo "Deleted files older than 30 days in this location :: /var/log/tomcat7/ "
#!/bin/bash
# Delete log files older than 30 days in this script.
find /var/log/tomcat7/localServer/logs/ -mtime +30 -type f -delete
echo "-----------------------------------------------------"
echo "$(date)"
echo "Deleted files older than 30 days in this location :: /var/log/tomcat7/ "