unix delete all files older than 14 days code example
Example 1: delete old files linux
find /opt/backup -type f -mtime +30 -exec rm -f {} \;
Example 2: delete logs older than 7 days linux
find /media/bkfolder/ -mtime +7 -name'*.gz' -exec rm {} \;