$ find /the/dir -name \*.dat -not -perm 644 -exec chmod 644 \{\} \;