How to Use BFS Attributes and Live Queries Day to Day
A practical guide to viewing and setting file attributes, building a saved query, and turning that query into a self-updating virtual folder in Tracker.
BFS’s attributes and live queries are genuinely useful day to day, not just architecturally interesting — this walks through actually using them from Tracker, Haiku’s desktop shell.
Step 1: view a file’s existing attributes
Tracker → right-click a file → Add/Remove Columns
(in a folder window set to list view)
Switching a Tracker folder window to list view and adding attribute columns shows indexed attributes (like Audio:Artist for music files) directly as sortable, browsable columns — no separate application needed to inspect them.
Step 2: set a custom attribute on a file manually
# from a Terminal:
addattr -t string "MyApp:Status" "Reviewed" myfile.txt
catattr myfile.txt # view all attributes on a file
Custom attributes aren’t limited to what built-in applications set automatically — any workflow that benefits from tagging files with structured metadata can define and use its own attribute names.
Step 3: build a query using the Find window
Tracker → Find (Alt+F, or the Find item in the Tracker menu) →
set "Search" to a specific attribute (e.g., Audio:Artist)
set a match condition (e.g., "is", "contains")
enter the value to match
This runs a one-time search matching the specified condition — a useful starting point before turning it into something that stays current automatically.
Step 4: turn the search into a live query
Find window → check "Live query" before running the search
With this enabled, the results update automatically as matching files are created, modified, or removed anywhere the query covers — see live queries for why this works without any extra background polling.
Step 5: save the query as a virtual, self-updating folder
Find window results → File → Save Query
(or drag the results window's icon to
a folder/Desktop to save it there)
A saved query behaves like an ordinary folder icon in Tracker, but opening it re-runs the live query rather than showing a fixed set of files — a folder that keeps itself current without anyone maintaining it manually.
Step 6: index a custom attribute so it’s queryable
# custom attributes need to be indexed to be efficiently queryable;
# check current indexes:
listattr -r /boot # or use the Attributes preferences panel where available
An attribute that isn’t indexed can still be set and viewed, but querying against it efficiently (rather than a slow full scan) requires it to be indexed first — worth checking if a custom-attribute-based query feels unexpectedly slow.
Step 7: use a live query for an actually practical workflow
A common real use: a live query for MIME:Type matching image formats, modified within the last week — functioning as a continuously updated “recent photos” view without needing to manually move or copy files into a dedicated folder as they’re created.
Why this is worth setting up rather than just searching manually each time
A live query costs nothing to maintain once created — it’s not a scheduled task or a background service you need to remember is running, just an indexed query the file system keeps current as a normal consequence of tracking attribute changes it already has to track anyway. For any recurring “find files matching X” need, a saved live query replaces repeatedly re-running the same manual search with something that’s simply always already up to date.