A slightly different approach is to use xargs:
find /path/to/jpgs -type f -print0 | xargs -0 jhead -v | grep 123
which was always a little easier for me to understand and adapt (the arguments -print0 and -0 are needed to deal with file names containing spaces)
This may be (not verified) more efficient than using -exec, because it will transfer the list of files to xargs, and xargs ensures that the jhead command is not too long.
Palmin Sep 15 '08 at 10:52 2008-09-15 10:52
source share