#!/bin/bash
FILE=/xxx/xxx
find ${FILE} -ctime +5 -type f -exec rm -f {} \;
Change the permission.
# chmod +x remove.sh
# crontab -e
Register it as cron job.
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
1 20 * * * root /root/remove.sh
Done.