File search tool using SQL-like queries to find files with complex conditions and metadata filtering
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.
# via Homebrew
brew install fselect
# via Cargo
cargo install fselect
# via Chocolatey
choco install fselect