Using extended attributes to tag files
alexlance.blog·5h·
Discuss: Hacker News
🔤Text Processing
Preview
Report Post

← back

Filesystem Tagging

by Alex Lance

1248 words, tech, ©2025-12-07

I wanted a simple and portable way to tag my old digital photo albums. No magic database files, opaque storage formats, or loose index files floating around. A tagging solution that could be backed up with my normal rsync processes and had widespread support.

It turns out that most modern filesystems support something called extended attributes (xattrs). And that you can use these to stick interesting metadata onto a file. In my case, arbitrary tags. Join me as I take you into the exciting nightmare that has been me categorizing 23 years of photos. I’m not a hoarder, you’re a hoarder.

Let’s jump in with a code example. There are two main commands that I’ve found: **getf…

Similar Posts

Loading similar posts...