$linuxjunkies
>

exiftool(1)

Read, write, and manipulate image metadata (EXIF, IPTC, XMP, and more).

UbuntuDebianFedoraArch

Synopsis

exiftool [OPTIONS] [-TAG[+=<VALUE>]] [FILE]...

Description

exiftool is a powerful command-line utility for reading and writing metadata in image files. It supports EXIF, IPTC, XMP, GPS, and other metadata formats across a wide range of image types including JPEG, PNG, GIF, TIFF, and RAW formats.

You can extract metadata, modify tags, copy metadata between files, and perform batch operations. By default, exiftool reads and displays metadata without modifying the original file unless explicitly instructed with write flags.

Common options

FlagWhat it does
-aallow duplicate tag names in output (print all instances)
-Gprint tag group name (e.g., EXIF, XMP) before each tag
-sshort output: print only tag values, no tag names
-nprint tag ID numbers in addition to tag names
-eeextract embedded metadata (useful for files containing images)
-overwrite_originaloverwrite original file when writing metadata (dangerous, use with care)
-boutput binary data (useful with -b TAGNAME to extract raw binary)
-csvprint metadata in CSV format for batch processing
-joutput metadata in JSON format
-configread config file for custom tag definitions and settings
-rrecursively process directories
-ifconditional processing (only process files matching expression)

Examples

Display all metadata tags and values for a JPEG file

exiftool photo.jpg

Show metadata grouped by category (EXIF, XMP, IPTC, etc.)

exiftool -G1 photo.jpg

Set artist and copyright metadata (creates backup as photo.jpg_original)

exiftool -Artist="John Doe" -Copyright="2024" photo.jpg

Update artist tag on all JPEG files in place (no backup)

exiftool -overwrite_original -Artist="Jane Smith" *.jpg

Change the original photo timestamp

exiftool -DateTimeOriginal="2024:01:15 14:30:00" -overwrite_original photo.jpg

Export metadata from all JPEGs to CSV file for spreadsheet analysis

exiftool -csv *.jpg > metadata.csv

Recursively extract metadata from all images in current directory as JSON

exiftool -r -j . > all_metadata.json

Copy all metadata from one image to another

exiftool -TagsFromFile source.jpg -all:all target.jpg

Related commands