ubuntu find and delete files older than 7 days in bash script code example Example: delete old files linux find /opt/backup -type f -mtime +30 -exec rm -f {} \;