EXIFGREP(1)
EXIFGREP(1) π
okay so bestie, welcome to the exifgrep page β the manual name is literally right there in the title, we're not doing a whole line about it, iykyk π
πΈ NAME πΈ
exifgrep β it selects and reformats the output of exifprobe. That's the whole assignment and it ate.
π¦ SYNOPSIS π¦
exifgrep [options] [egrep_options] egrep_pattern [NOT egrep-pattern] filename(s)
π DESCRIPTION π
okay so here's the tea β exifgrep is a shell script, and what it does is take egrep(1) and point it straight at the output of exifprobe -L, which gives you easy selection and minor reformatting of output items. selection plus glow-up, the full package β¨
exifprobe is small, fast, and utterly sycophantic in its desire to report everything it finds in an image. so exifgrep aims the regular expression matching powers of egrep at that whole output barrage so you only extract the info you actually wanted. no cap π«Ά
exifgrep also does a mild little selection on the output fields of exifprobe -L. the thing is, lots of items that exifprobe reports are stored in the image file as a number that compactly stands in for a defined value.
like, exifprobe -L might report
TIFF.Ifd1.ResolutionUnit = 2 = 'pixels per inch'
where that value 2 has to be interpreted to mean that the resolution values (TIFF.IFd1.Xresolution and TIFF.IFd1.YResolution) are recorded in pixels per inch, rather than, say, pixels per centimeter. exifprobe reports both fields, and it may also report interpreted values for items that are recorded in unfamiliar units, like
JPEG.APP1.Ifd0.Exif.FNumber = 5.6 APEX = 'f7.0'
in all such cases, exifgrep reports (by default) only the "human readable" field π
TIFF.Ifd1.ResolutionUnit = 'pixels per inch'
JPEG.APP1.Ifd0.Exif.FNumber = 'f7.0'
unless the -num option is given to select the numerical value instead.
and on top of all that, there's a variable format you can select with -var which eliminates whitespace entirely, giving you a format that typical shells may use directly to set variables for further processing. e.g.
TIFF.Ifd1.ResolutionUnit='pixels per inch'
JPEG.APP1.Ifd0.Exif.FNumber='f7.0'
π OPTIONS π
-rβ file arguments may be directories, and those directories get searched viafindfor all image types recognized byexifprobe.-nβ forcesexifprobeto print a filename for each line of its output, whichexifgrepthen turns into a comment at the end of each matching line.-tβ forcesexifprobeto print tag numbers for all itemes that have them, so you can match on hex or decimal tag numbers.-cβ turns on color output fromexifprobe. colors, bestie!!-hβ prints a usage message (help).-varβ reports in "variable" format, which any Bourne-compatible shell may directlysourceβ except that most shells will insist the dots must be replaced, e.g. by underscores.-exportβ reports in "variable" format, but with a Bourne-compatibleexportcommand.-numβ reports numerical values rather than interpreted strings, for fields which have both.
NOTE: the-varand-exportoptions are obsolescent; they're retained for compatibility with earlier versions ofexifprobe. a post-processor such asreformat.shmay be more effective for the current version if shell-compatible output is what you want. π«
any option that the script doesn't recognize gets passed on to egrep.
the first non-option argument gets used as the pattern passed to egrep. after that you may put the keyword NOT and an expression representing matches to be rejected. that pattern gets passed to egrep -v. only one argument of each type may be given, and the "accept" expression (if given) must appear before the "reject" expression. periodt π
all remaining arguments are interpreted as image filenames.
π SEE ALSO π
π«Ά AUTHOR π«Ά
Duane H. Hesser dhh@virtual-cafe.com
and that's the whole page, bestie π this one lives in the LOCAL manual set β that's the source, and the page doesn't hand us a date, so we're not inventing one π go forth, grep your exif, be the main character of your own image metadata ππ
π¦ where this page comes from
- debian trixie: exifprobe 2.0.1+git20201230.eee65ff-2 Β· BSD-2-Clause
- ubuntu questing: exifprobe 2.0.1+git20201230.eee65ff-2
- ubuntu resolute: exifprobe 2.0.1+git20201230.eee65ff-2build1 Β· BSD-2-Clause
- ubuntu stonking: exifprobe 2.0.1+git20201230.eee65ff-3 Β· BSD-2-Clause
- Copyright 2003, 2005 Duane H. Hesser, see LICENSE.EXIFPROBE file
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms