Find corrupted jpeg image files

来源:互联网 发布:paxos算法实现 编辑:程序博客网 时间:2024/05/22 07:47

Find corrupted jpeg image files

Terminal - Find corrupted jpeg image files
find . -name "*jpg" -exec jpeginfo -c {} \; | grep -E "WARNING|ERROR"
2009-06-03 22:08:48
User: vincentp
Functions: find grep
11
Up
Down
Find corrupted jpeg image files

Finds all corrupted jpeg files in current directory and its subdirectories. Displays the error or warning found.

The jpeginfo is part of the jpeginfo package in debian.

Should you wish to only get corrupted filenames, use cut to extract them :

find ./ -name *jpg -exec jpeginfo -c {} \; | grep -E "WARNING|ERROR" | cut -d " " -f 1
Show sample output | Add to favourites | Report as malicious

Alternatives

There are 3 alternatives - vote for the best!

Terminal - Alternatives
find . -iname '*jpg' -print0 | xargs -0 exiftool -warning; find . -iname '*jpg' -print0 | xargs -0 jpeginfo -c
2013-01-28 16:44:19
User: unixmonkey46191
Functions: find xargs
Tags: Image processing image photo jpeg corrupt
0
Up
Down
Find corrupted jpeg image files

This checks jpeg data and metadata, should be grepped as needed, maybe a -B1 Warning for the first, and a -E "WARNING|ERROR" for the second part....

Comments (0) |Add to favourites |Report as malicious

Know a better way?

If you can do better, submit your command here.

0 0
原创粉丝点击