Repolode
jhspetersson

jhspetersson/fselect

A command-line file finder that lets you search the filesystem with SQL-like queries instead of find and ls flags.

Stars
4,474
Forks
87
Open issues
6
Last commit
2 days ago

What is it?

fselect is a Rust command-line tool for finding files using a relaxed, SQL-like syntax. You select columns such as name, path, size, or modified, specify directories with a from clause, and filter with a where clause. It also supports group by, having, order by, limit, and output formatting into JSON, CSV, or HTML.

Beyond basic name and size filters, fselect can search inside zip archives, respect .gitignore, .hgignore, and .dockerignore files, and filter by image dimensions, EXIF data, audio tags, extended attributes, POSIX ACLs, file hashes, and MIME type. Subqueries let you compare results across several directories, and aggregate and date functions support statistics over matched files.

For large trees, it can optionally use the plocate index on Linux or the Everything index on Windows for faster lookups. An interactive mode is also available.

Key features

  • 01Uses a relaxed SQL-like grammar for selecting, filtering, grouping, and sorting files.
  • 02Searches inside zip archives and filters by EXIF, image dimensions, and audio tags.
  • 03Supports .gitignore, .hgignore, and .dockerignore rules.
  • 04Filters by file hashes, MIME type, extended attributes, permissions, and owner.
  • 05Supports subqueries across multiple directories and aggregate functions.
  • 06Outputs results as JSON, CSV, HTML, or plain text.

Use cases

  • Finding large or old files to clean up disk space across several directories.
  • Auditing files with dangerous permissions or unexpected owners on a server.
  • Locating duplicate files by comparing hashes between folders.
  • Listing media files by dimensions, duration, or tags for organizing a library.

Quick start

  1. 1

    Install Rust with Cargo

  2. 2

    Install fselect from crates.io

    cargo install fselect
  3. 3

    Run a query to list files by size and path

    fselect size, path from /home/user where name = '*.cfg' or name = '*.tmp'

Things to know

  • The .gitignore, .hgignore, and .dockerignore support is marked experimental.
  • Searching within archives currently supports only zip files.

In collections

Topics

FAQ

What is fselect?
A command-line file finder that lets you search the filesystem with SQL-like queries instead of find and ls flags. fselect is a Rust command-line tool for finding files using a relaxed, SQL-like syntax. You select columns such as name, path, size, or modified, specify directories with a from clause, and filter with a where clause. It also supports group by, having, order by, limit, and output formatting into JSON, CSV, or HTML.
Is fselect free to use? What license does it have?
fselect is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is fselect still maintained?
Actively maintained. The last commit to fselect was on Nov 6, 2026.
What can I use fselect for?
Finding large or old files to clean up disk space across several directories. Auditing files with dangerous permissions or unexpected owners on a server. Locating duplicate files by comparing hashes between folders. Listing media files by dimensions, duration, or tags for organizing a library.
How do I install fselect?
Install Rust with Cargo Install fselect from crates.io: cargo install fselect Run a query to list files by size and path: fselect size, path from /home/user where name = '*.cfg' or name = '*.tmp'
Where can I get fselect?
The source code and installation instructions are on GitHub: https://github.com/jhspetersson/fselect

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects