Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a lot of PDFs and many of them may be corrupt. Rather than checking each one, how could I check them all at once and delete any that are corrupt?

Using Linux. I also don't have a way to get the md5sum of the books, so that's out.

This can either be done with a shell script or I would be interested in learning how to write a C program to do this. But again, my main problem is that I don't have anything to compare the md5sum to.

share|improve this question

The Multivalent project includes a PDF validation tool that seems to fit your requirements.

Validate

Examines PDFs at a selectable level of detail and reports errors. Quickly check for invalid or damaged PDFs in your archive, or validate a freshly downloaded bunch of PDFs.

share|improve this answer

What you are looking for is file format validation. Perhaps JHOVE - JSTOR/Harvard Object Validation Environment would be useful.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .