Using exiftool
to inspect EXIF metadata from files #
Install exiftool
#
Check if exiftool
is already running on your system:
1printf "checking exiftool installation:\n\n%s\n\n" "$(which exiftool)"
Or more simply:
1which exiftool
If you need to install exiftool
, consult the official installation instructions. For each platform:
Usage #
For help on how to use exiftool
, simply run the program without any arguments.
1exiftool
Or view the complete documentation on the official exiftool
web page.
Sample commands #
The input files must be provided as the last argument. You can use a glob pattern (e.g., *
) or a single filename.
Below are some useful examples for read-only commands of parsing EXIF data from files.
1INPUT_FILE="screenshot.png"
1# print every exif
2exiftool -duplicates -groupNames1 -short -forcePrint "$INPUT_FILE"
3
4# as a table
5exiftool -duplicates -groupNames1 -short -table "$INPUT_FILE"
6
7# as a tabular list
8exiftool -duplicates -groupNames1 -short -tab "$INPUT_FILE"
9
10# write to comma-delimited file
11exiftool -csv>"exif_dump.$INPUT_FILE.tsv" "$INPUT_FILE"
12
13# write to tab-delimited file
14exiftool -csvDelim $'\t' -csv>"exif_dump.$INPUT_FILE.tsv" "$INPUT_FILE"
15
16# write to an HTML document
17exiftool -progress -htmlDump>"exif_dump.$INPUT_FILE.html" "$INPUT_FILE"
18# open the document in your default web browser
19`which xdg-open` || `which open` "exif_dump.$INPUT_FILE.html"