← 返回命令列表

Linux command

exiftool 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Show all metadata

exiftool [image.jpg]

Show specific tags

exiftool -DateTimeOriginal -Model [image.jpg]

Show metadata

exiftool [/path/to/directory]

Remove all metadata

exiftool -all= [image.jpg]

Set a specific tag

exiftool -Artist="[Name]" [image.jpg]

Copy metadata

exiftool -TagsFromFile [source.jpg] [dest.jpg]

Rename files

exiftool "-FileName<DateTimeOriginal" -d "%Y%m%d_%H%M%S.%%e" [*.jpg]

Shift all dates

exiftool "-AllDates+=0:0:0 1:30:0" [image.jpg]

Extract embedded thumbnail

exiftool -b -ThumbnailImage [image.jpg] > [thumb.jpg]

说明

ExifTool is a powerful, platform-independent tool for reading, writing, and editing metadata in a wide variety of file formats. It supports EXIF, IPTC, XMP, GPS, and many proprietary metadata formats used by cameras and software. The tool can handle images (JPEG, TIFF, PNG, RAW formats), audio files, video files, PDFs, and documents. It recognizes metadata from virtually every camera manufacturer and supports both reading and writing for most formats. ExifTool is invaluable for photographers organizing collections, forensic analysts examining files, and anyone needing to manage file metadata programmatically.

参数

-_tag_
Extract specific tag.
-_tag_= _value_
Set tag to value.
-all=
Remove all writable metadata.
-TagsFromFile _file_
Copy tags from another file.
-r, -recurse
Process directories recursively.
-overwrite_original
Overwrite file instead of creating backup.
-d _fmt_
Set date/time output format (strftime syntax).
-FileName< _tag_
Rename file based on tag.
-json
Output as JSON.
-csv
Output as CSV.
-b
Output binary data.
-v
Verbose output.
-n
Disable print conversion.
-s
Short output format.
-G
Show group name for each tag.
-ext _EXT_
Process only files with specified extension.
-X
Output in RDF/XML format.
-p _FMT_
Print output in custom format using tag names.
-if _EXPR_
Conditionally process files using Perl expression.
-q
Quiet processing (suppress informational messages).

FAQ

What is the exiftool command used for?

ExifTool is a powerful, platform-independent tool for reading, writing, and editing metadata in a wide variety of file formats. It supports EXIF, IPTC, XMP, GPS, and many proprietary metadata formats used by cameras and software. The tool can handle images (JPEG, TIFF, PNG, RAW formats), audio files, video files, PDFs, and documents. It recognizes metadata from virtually every camera manufacturer and supports both reading and writing for most formats. ExifTool is invaluable for photographers organizing collections, forensic analysts examining files, and anyone needing to manage file metadata programmatically.

How do I run a basic exiftool example?

Run `exiftool [image.jpg]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -_tag_ do in exiftool?

Extract specific tag.