How to scan your file system and query files using SQL
TL;DR: In this guide, you'll learn how to use surveilr to scan directories, capture file metadata in a SQLite database, and query for files using SQL—find PDFs, track document changes, and audit file system activity.
Prerequisites: surveilr installed
The Problem: Finding Files is Hard
If you've ever needed to track files across your system for compliance audits or project management, you know the pain:
Scattered files — Documents, spreadsheets, and PDFs across multiple directories
Manual searches — Using find and Finder/Explorer is tedious and limited
No audit trail — No record of what existed when
Point-in-time only — No way to track file changes over time
What if you could turn your entire file system into a queryable SQL database where you can find any file with SQL queries?
That's exactly what surveilr does.
What is surveilr?
surveilr is an edge-based, SQL-first surveillance platform that turns your file system into a Resource…