FSELECT(1)

NAME
fselect - find files with SQL-like queries

SYNOPSIS
fselect [ARGS] COLUMN [, COLUMN ...] [ from ROOT [, ROOT...] ] [where EXPR] [group by COLUMNS] [order by COLUMNS] [limit N] [into FORMAT]

DESCRIPTION
fselect is a simple utility with a SQL-like query for finding files.

You write SQL-like query, that's it.

fselect command itself is like a first keyword (select, i.e., file select). But if you'll put one more select behind occasionally, that's not a problem.

Next you put columns you are interested in. It could be file name or path, size, modification date, etc. See full list of possible columns. You can add columns with arbitrary text (put in quotes if it contains spaces). A few functions (aggregating and formatting) are there for your service. You can use arithmetic expressions when it makes sense.

Where to search? Specify with from keyword. You can list one or more directories separated with comma. If you leave the from, then current directory will be processed.

What to search? Use where with any number of conditions.

Order results like in real SQL with order by. All columns are supported for ordering by, as well as asc/desc parameters and positional numeric shortcuts.

Limiting search results is possible with limit. Formatting options are supported with into keyword.

If you want to use operators containing > or <, put the whole query into double quotes. This will protect query from the shell and output redirection. The same applies to queries with parentheses or *, ? and other special symbols that are shell metacharacters

COLUMNS AND FIELDS

•   name

•   extension or ext

•   path

•   abspath

•   directory or dirname or dir

•   absdir

•   size

•   hsize or fsize

•   uid

•   gid

•   user

•   group

•   created

•   accessed

•   modified

•   is_dir

•   is_file

•   is_symlink

•   is_pipe or is_fifo

•   is_character or is_char

•   is_block

•   is_socket

•   device

•   inode

•   blocks

•   hardlinks

•   mode

•   user_read

•   user_write

•   user_exec

•   user_all

•   group_read

•   group_write

•   group_exec

•   group_all

•   other_read

•   other_write

•   other_exec

•   other_all

•   suid

•   sgid

•   is_hidden

•   has_xattrs

•   capabilities or caps

•   is_shebang

•   is_empty

•   width

•   height

•   duration

•   mp3_bitrate or bitrate

•   mp3_freq or freq

•   mp3_title or title

•   mp3_artist or artist

•   mp3_album or album

•   mp3_genre or genre

•   mp3_year

•   exif_datetime

•   exif_altitude or exif_alt

•   exif_latitude or exif_lat

•   exif_longitude or exif_lng or exif_lon

•   exif_make

•   exif_model

•   exif_software

•   exif_version

•   mime

•   is_binary

•   is_text

•   line_count

•   is_archive

•   is_audio

•   is_book

•   is_doc

•   is_image

•   is_source

•   is_video

•   sha1

•   sha2_256 or sha256

•   sha2_512 or sha512

•   sha3_512 or sha3

ENVIRONMENT

LS_COLORS
    Determines how to colorize search results, see dircolors(1).

EXIT STATUS
The fselect utility exists with status 0 as long as the provided query parses correctly.

EXAMPLES

Find files and directories that match the pattern 'needle':
    $ fselect name WHERE name =~ "needle"

Start a search in a given directory (/var/log):
    $ fselect name FROM /var/log

SEE ALSO
find(1) fd(1)