From e41802653dfada584cfc2e12a413311b55fdb6e8 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Sun, 22 Feb 2026 11:52:47 -0600 Subject: [PATCH] Add Inspect EXIF Data For An Image File as a Unix TIL --- README.md | 3 +- unix/inspect-exif-data-for-an-image-file.md | 47 +++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 unix/inspect-exif-data-for-an-image-file.md diff --git a/README.md b/README.md index f427e77..fb7e992 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ working across different projects via [VisualMode](https://www.visualmode.dev/). For a steady stream of TILs, [sign up for my newsletter](https://visualmode.kit.com/newsletter). -_1743 TILs and counting..._ +_1744 TILs and counting..._ See some of the other learning resources I work on: @@ -1710,6 +1710,7 @@ If you've learned something here, support my efforts writing daily TILs by - [Ignore A Directory During ripgrep Search](unix/ignore-a-directory-during-ripgrep-search.md) - [Ignore The Alias When Running A Command](unix/ignore-the-alias-when-running-a-command.md) - [Include Ignore Files In Ripgrep Search](unix/include-ignore-files-in-ripgrep-search.md) +- [Inspect EXIF Data For An Image File](unix/inspect-exif-data-for-an-image-file.md) - [Interactively Browse Available Node Versions](unix/interactively-browse-availabile-node-versions.md) - [Interactively Switch asdf Package Versions](unix/interactively-switch-asdf-package-versions.md) - [Interpret Cron Schedule From The CLI](unix/interpret-cron-schedule-from-the-cli.md) diff --git a/unix/inspect-exif-data-for-an-image-file.md b/unix/inspect-exif-data-for-an-image-file.md new file mode 100644 index 0000000..2e3daad --- /dev/null +++ b/unix/inspect-exif-data-for-an-image-file.md @@ -0,0 +1,47 @@ +# Inspect EXIF Data For An Image File + +The `exiftool` CLI (which can be downloaded via `brew`) is a useful tool for +inspecting all the EXIF data attached to a media file. A media file like an +image has a bunch of additional details embedded in it like timestamps, image +metadata, and sometimes location information. + +Here is all the data attached to a screenshot I found on my desktop: + +```bash +❯ exiftool ~/Desktop/CleanShot\ 2025-11-17\ at\ 11.22.18@2x.png +ExifTool Version Number : 13.50 +File Name : CleanShot 2025-11-17 at 11.22.18@2x.png +Directory : /Users/lastword/Desktop +File Size : 1194 kB +File Modification Date/Time : 2025:11:17 11:22:21-06:00 +File Access Date/Time : 2025:12:15 10:43:55-06:00 +File Inode Change Date/Time : 2025:12:05 15:37:48-06:00 +File Permissions : -rw-r--r-- +File Type : PNG +File Type Extension : png +MIME Type : image/png +Image Width : 2502 +Image Height : 1232 +Bit Depth : 8 +Color Type : RGB with Alpha +Compression : Deflate/Inflate +Filter : Adaptive +Interlace : Noninterlaced +XMP Toolkit : XMP Core 6.0.0 +Y Resolution : 144 +Resolution Unit : inches +X Resolution : 144 +Exif Image Width : 2502 +Color Space : sRGB +User Comment : Screenshot +Exif Image Height : 1232 +SRGB Rendering : Perceptual +Image Size : 2502x1232 +Megapixels : 3.1 +``` + +This works with other kinds of media files. For instance, I ran this against an +MP4 screen recording file which contained even more metadata. + +In addition to reading data, `exiftool` can also write it. See `man exiftool` +for more details on what else it can do.