I do have just one corrupted photo into my Photos Library.
Is there is any UNIX command line that I can use in terminal in order to scan my Photos Library Folder and find out which file is corrupted?
command lineiphotophotosterminal
I do have just one corrupted photo into my Photos Library.
Is there is any UNIX command line that I can use in terminal in order to scan my Photos Library Folder and find out which file is corrupted?
Best Answer
My first thought was that ImageMagick is bound to have something for this, and indeed it does. You could run something like this
where you can replace
.
with your directory of choice (it will descend recursively) to check each file or image with ImageMagick'sidentify
command. Grepping for 'Corrupt' will print youidentify
s output for those files which are in fact corrupt. You could probably trim the output to make it more readable, which would involve some regexing forgrep
.Obviously, you need to have ImageMagick installed for this. If you use MacPorts, it's as simple as
sudo port install ImageMagick
.