The following simple command will browse through the tree of the current directory for various archive files and test their integrity. If the test fails, it'll print the file's path. You can easily extend it by adding more filename patterns and tests.
find . -type f \( \( -iname '*.zip' -o -iname '*.jar' -o -iname '*.war' -o -iname '*.ear' -o -iname '*.odt' -o -iname '*.ods' -o -iname '*.odp' -o -iname '*.docx' -o -iname '*.xlsx' -o -iname '*.pptx' -o -iname '*.xpi' \) -not -exec sh -c "unzip -t -P '' '{}' > /dev/null 2>&1" \; -o \( -iname '*.tar.gz' -o -iname '*.tgz' \) -not -exec sh -c "tar tzf '{}' > /dev/null 2>&1" \; -o -iname '*.tar.bz2' -not -exec sh -c "tar tjf '{}' > /dev/null 2>&1" \; -o -iname '*.tar' -not -exec sh -c "tar tf '{}' > /dev/null 2>&1" \; -o -iname '*.rar' -not -exec sh -c "unrar t -p- '{}' > /dev/null 2>&1" \; \) -print
Recent comments
1 year 43 weeks ago
3 years 13 weeks ago
3 years 13 weeks ago
3 years 15 weeks ago
3 years 16 weeks ago
3 years 22 weeks ago
3 years 22 weeks ago
3 years 23 weeks ago
3 years 23 weeks ago
3 years 23 weeks ago