detect if PDF file is made from images
pdfimages -list filename.pdf
Should do the trick. This gives you a list of images contained in the PDF file.
You can install pdftotext and see if it generated more than no output string:
for file_name in *.pdf; do
if [ $(pdftotext "$file_name")"x" == "x" ] ; then mv "$file_name" /to/ocr ; fi
done
Under Debian and derivates that utility is in package poppler-utils
.