A file that opens fine can still be broken halfway through. Decoding the whole thing is the only way to know, and ffmpeg can do that without writing an output.
ffmpeg -v error -i movie.mkv -f null -
-f null - sends the decoded frames nowhere, and -v error hides everything except errors. A healthy file prints nothing at all. A damaged one prints lines about corrupt frames, missing references or, for a file that was cut off, something like “File ended prematurely”, which is what a file truncated on purpose shows.
To check a whole folder and keep a list of the bad ones, I’d loop over the files and save each error output to a log next to it:
for f in *.mkv; do
ffmpeg -v error -i "$f" -f null - 2> "$f.errors.log"
done
Empty log, fine file. The downside is time: it decodes every frame, so a two-hour film takes as long as it takes your machine to decode it, which is usually a lot less than playing it but still minutes. Hardware decoding with -hwaccel can speed it up, though a hardware decoder may report problems differently from the software one.
Further reading: ffmpeg documentation