"dcraw decodes raw photos, displays metadata, and extracts thumbnails." - man dcraw

Examples

Identify corrupt DNG files

find /photos -iname '*.dng' | xargs dcraw -i > /dev/null 2> corrupt-files.txt