pgr0ss / findex

Recursively index files and store results in a sqlite database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

findex

Rust

Recursively index files and store results in a sqlite database.

Note that this is mostly a project to help me learn Rust.

Usage

Current operations:

  • Add files to the index db: findex add --verbose <path>
  • Dump the contents: findex dump --verbose

And then you can query the db with sql, such as finding duplications:

sqlite3 -line files.db "select size, sha256, group_concat(filename) from files group by size, sha256 having count(*) > 1 order by size"

Help text:

% findex -h
Recursively index files and store results in a sqlite database

Usage: findex <COMMAND>

Commands:
  add   Adds files to the index
  dump  Dumps file information from the index
  help  Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Development

Normal cargo operations:

  • Run tests: cargo test
  • Run app: cargo run -- add .
  • Build debug version: cargo build
  • Build release version: cargo build --release

A few helpers in the justfile, such as just test.

About

Recursively index files and store results in a sqlite database

License:MIT License


Languages

Language:Rust 92.4%Language:Just 7.6%