Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
FSELECT(1)		    General Commands Manual		    FSELECT(1)

NAME
       fselect - find files with SQL-like queries

SYNOPSIS
       fselect	[ARGS] COLUMN [, COLUMN	...]  [	from ROOT [, ROOT...] ]	[where
       EXPR] [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  se-
       lect).	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  sup-
       ported  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
       o      name

       o      path

       o      abspath

       o      size

       o      hsize or fsize

       o      uid

       o      gid

       o      user

       o      group

       o      created

       o      accessed

       o      modified

       o      is_dir

       o      is_file

       o      is_symlink

       o      is_pipe or is_fifo

       o      is_character or is_char

       o      is_block

       o      is_socket

       o      device

       o      inode

       o      blocks

       o      hardlinks

       o      mode

       o      user_read

       o      user_write

       o      user_exec

       o      user_all

       o      group_read

       o      group_write

       o      group_exec

       o      group_all

       o      other_read

       o      other_write

       o      other_exec

       o      other_all

       o      suid

       o      sgid

       o      is_hidden

       o      has_xattrs

       o      is_shebang

       o      width

       o      height

       o      duration

       o      mp3_bitrate or bitrate

       o      mp3_freq or freq

       o      mp3_title	or title

       o      mp3_artist or artist

       o      mp3_album	or album

       o      mp3_genre	or genre

       o      mp3_year

       o      exif_datetime

       o      exif_altitude or exif_alt

       o      exif_latitude or exif_lat

       o      exif_longitude or	exif_lng or exif_lon

       o      exif_make

       o      exif_model

       o      exif_software

       o      exif_version

       o      mime

       o      is_binary

       o      is_text

       o      is_archive

       o      is_audio

       o      is_book

       o      is_doc

       o      is_image

       o      is_source

       o      is_video

       o      sha1

       o      sha2_256 or sha256

       o      sha2_512 or sha512

       o      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)

								    FSELECT(1)

NAME | SYNOPSIS | DESCRIPTION | COLUMNS AND FIELDS | ENVIRONMENT | EXIT STATUS | EXAMPLES | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=fselect&sektion=1&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help