Delete *.log files older then 30 days find /var/www/data/logs -name "*.log" -type f -mtime +30 -exec rm -f {} \;