find /path/to/dir -type f -atime +10 -exec rm {} \;