FastNTFS is a Windows NTFS file search daemon written in Go, backed by the USN journal and SQLite.
FastNTFS 是一个运行在 Windows 上的 NTFS 文件搜索守护进程,使用 Go 编写,底层依赖 USN journal 和 SQLite。
- Full snapshot build from NTFS USN records
基于 NTFS USN 记录构建全量快照 - Incremental daemon updates from USN journal
基于 USN journal 持续增量更新 - Local HTTP search API and CLI search command
提供本地 HTTP 搜索接口和命令行搜索 - Windows scheduled-task based service install/uninstall
基于 Windows 计划任务的安装与卸载
- Windows (Administrator required for USN operations)
Windows(涉及 USN 操作时需要管理员权限) - Go 1.24+
Go 1.24+ - NTFS volumes
NTFS 分区
cd C:\Users\MECHREV\projects\FastNTFS
go run . rebuild --volumes D --db C:\data\fastntfs.db
go run . serve --volumes D --db C:\data\fastntfs.db --addr 127.0.0.1:12345 --flush-seconds 10
go run . search --addr http://127.0.0.1:12345 --contains test --field name --type file --limit 20
go run . search --addr http://127.0.0.1:12345 --like '%test%' --field all --type all --limit 20cd C:\Users\MECHREV\projects\FastNTFS
.\install_service.ps1 -DbPath C:\data\fastntfs.dbDefault behavior | 默认行为:
- Auto-detect and include all local NTFS volumes
自动探测并包含所有本地 NTFS 分区 - Build binary to
~/bin/fast-ntfs.exe
将二进制构建到~/bin/fast-ntfs.exe - Rebuild full index before service starts
服务启动前先重建全量索引
Optional flags | 可选参数:
-Volumes D,E-SkipRebuild-MaxRecords 50000000
GET /andGET /help: return plain-text API help
GET /和GET /help:返回纯文本帮助信息--contains <text>: substring shortcut, rewritten toLIKE '%text%'
--contains <text>:子串快捷方式,内部会改写为LIKE '%text%'--like <pattern>: raw SQLLIKEpattern such as'%x%','%x',x%'
--like <pattern>:原始 SQLLIKE模式,例如'%x%'、'%x'、'x%'--field name|path|all
--field name|path|all--type file|dir|all
--type file|dir|allformat=text|jsonon/search(textby default)
/search支持format=text|json(默认text)--containsand--likeare mutually exclusive
--contains与--like互斥
Examples | 示例:
curl "http://127.0.0.1:12345/"
curl "http://127.0.0.1:12345/help"
curl "http://127.0.0.1:12345/search?contains=rg.exe"
curl "http://127.0.0.1:12345/search?contains=rg.exe&format=json".\uninstall_service.ps1