# fselect

> File search tool using SQL-like queries to find files with complex conditions and metadata filtering

Stars: 4.5k · Categories: Search

- Repository: https://github.com/jhspetersson/fselect
- Website: https://fselect.rocks
- Page: https://www.trmn.sh/tools/fselect

## Install

- Homebrew: `brew install fselect`
- Cargo: `cargo install fselect`
- Chocolatey: `choco install fselect`

## Overview

fselect is a file search tool that uses SQL-like syntax to query file systems with complex conditions. It provides an alternative to traditional `find` and `ls` commands by allowing users to write queries like `fselect size, path from /home/user where name = '*.cfg' or name = '*.tmp'` to search for files based on various attributes.

The tool supports advanced filtering capabilities including search within archives, image metadata (width, height, EXIF data), MP3 information (genre, bitrate, year), file hashes, MIME types, and POSIX file attributes. It can respect `.gitignore`, `.hgignore`, and `.dockerignore` files during searches and offers aggregate functions for statistics like MIN, MAX, AVG, SUM, and COUNT operations on search results.

fselect includes an interactive mode for building queries incrementally and supports multiple output formats including CSV, JSON, and HTML. The tool can perform complex operations like subqueries, regular expression matching, date-based searches with human-readable formats ('today', 'yesterday', 'last fri'), and file permission analysis. It's particularly useful for system administrators, developers, and users who need to perform sophisticated file system queries beyond basic filename matching.

### Installation

```bash
# via Homebrew
brew install fselect
```

```bash
# via Cargo
cargo install fselect
```

```bash
# via Chocolatey
choco install fselect
```

## Alternatives

- [ddgr](https://www.trmn.sh/tools/ddgr.md): Command line utility to search DuckDuckGo from the terminal with custom result counts and privacy features. (3.6k stars)
- [television](https://www.trmn.sh/tools/television.md): Fuzzy finder for the terminal that searches files, text, git repositories, and custom data sources in real-time (Rust, 6.4k stars)
- [sad](https://www.trmn.sh/tools/sad.md): Batch file search-and-replace tool that shows a diff preview before writing changes; optional fzf selection of hunks and delta/diff-so-fancy colorizing. (Rust, 2.0k stars)
- [skim](https://www.trmn.sh/tools/skim.md): Fuzzy finder written in Rust with interactive search capabilities and shell integration (Rust, 7.0k stars)
- [peco](https://www.trmn.sh/tools/peco.md): Interactive line filter written in Go that reads stdin, filters incrementally as you type, and prints selected lines to stdout. Single binary, no dependencies. (Go, 7.9k stars)

## Guides

- [Modern Replacements for find](https://www.trmn.sh/replace/find): Replace find with fd, bfs or fselect: regex search with smart defaults, a breadth-first drop-in, or SQL-like file queries.

---

Canonical: https://www.trmn.sh/tools/fselect
