LinuxCommandLibrary

fselect

SQL-like query language for file searching

TLDR

Find files by name

$ fselect name from [/path] where name = '[*.txt]'
copy
Find large files
$ fselect name, size from [/path] where size > [1g]
copy
Find by extension
$ fselect name from [/path] where ext = '[jpg]'
copy
Find recent files
$ fselect name, modified from [/path] where modified > [yesterday]
copy
Show image dimensions
$ fselect name, width, height from [/path] where ext = '[png]'
copy

SYNOPSIS

fselect fields from paths [where conditions] [options]

DESCRIPTION

fselect uses SQL-like syntax to find and query files. It treats the filesystem as a database, selecting attributes and filtering by conditions using familiar SQL syntax.
The tool extracts metadata including size, dates, permissions, and for images and audio, dimensions and tags. Aggregation functions like count and sum work on results.
fselect bridges the gap between find's power and SQL's readability.

PARAMETERS

FIELDS

Columns to output: name, size, modified, ext, width, etc.
PATHS
Directories to search.
CONDITIONS
Filter expressions.
where
Introduce filter conditions.
order by FIELD
Sort results.
limit N
Limit output count.
--help
Display help information.

CAVEATS

Complex queries may be slow on large directories. Some fields require reading file content. SQL syntax has some limitations.

HISTORY

fselect was created to provide an intuitive query language for file searching. It applies database query concepts to filesystem operations for familiar and powerful searches.

SEE ALSO

find(1), fd(1), locate(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community