How to check if a large file contains only zero bytes (\'\\0\') in Linux using a shell command? I can write a small program for this but this seems to be an ov
\'\\0\'
Completely changed my answer based on the reply here
Try
perl -0777ne'print /^\x00+$/ ? "yes" : "no"' file