ZFIND(1)

πŸ“¦ version 0.4.7, in ubuntu stonking

πŸ’– NAME πŸ’–

okay so bestie, <rainbow>zfind</rainbow> β€” it searches for files, and yes it looks inside archives too. no cap. πŸ”₯


✨ SYNOPSIS ✨

zfind [<where> [<path> ...]] [flags]

🌸 DESCRIPTION 🌸

zfind makes finding files easy, and the filter syntax is lowkey giving SQL-WHERE clause energy. it's giving "I took the WHERE from your database and put it in your shell". πŸ’…

For examples run zfind -H or go to https://github.com/laktak/zfind.

πŸŽ€ Arguments πŸŽ€

  • [<where>] β€” the filter, using SQL-where syntax (peep -H for the deets). If you wanna skip it but still give a path, just use -.
  • [<path> ...] β€” the paths to search. yes plural, go off. πŸ‘‘

🫢 Flags 🫢

  • -h, --help β€” show context-sensitive help.
  • -H, --filter-help β€” show where-filter help. (this is the one you want when you're confused, bestie.)
  • -l, --long β€” show long listing format.
  • --csv β€” show listing as CSV.
  • --csv-no-head β€” show listing as CSV, but with no header. the header said "not today" πŸ’€
  • --archive-separator="//" β€” separator between the archive name and the file inside.
  • -L, --follow-symlinks β€” follow symbolic links.
  • -n, --no-archive β€” disables archive support.
  • -0, --print0 β€” use a null character instead of the newline character. it's made to be used with the -0 option of xargs.
  • -V, --version β€” show version.

πŸ”₯ EXAMPLES πŸ”₯

here are the vibes, verbatim, slay:

# find files smaller than 10KB, in the current path
zfind 'size<10k'

# find files in the given range in /some/path
zfind 'size between 1M and 1G' /some/path

# find files modified before 2010 inside a tar
zfind 'date<"2010" and archive="tar"'

# find files named foo* and modified today
zfind 'name like "foo%" and date=today'

# find files that contain two dashes using a regex
zfind 'name rlike "(.*-){2}"'

# find files that have the extension .jpg or .jpeg
zfind 'ext in ("jpg","jpeg")'

# find directories named foo and bar
zfind 'name in ("foo", "bar") and type="dir"'

# search for all README.md files and show in long listing format
zfind 'name="README.md"' -l

# show results in csv format
zfind --csv
zfind --csv-no-head

πŸ¦‹ Where Syntax πŸ¦‹

this is the part where it gets good. πŸ’œ

  • AND, OR and () parentheses are logical operators, and you use them to combine multiple conditions. AND means both conditions gotta be true for a row to show up in the results. OR means if either condition is true, the row gets included. parentheses group conditions, just like in math class (but actually useful this time).

Example: '(size > 20M OR name = "temp") AND type="file"' selects all files that are either greater than 20 MB in size or are named temp.

  • Operators =, <>, !=, <, >, <=, >= are comparison operators, used to compare values and file properties. the types must match, meaning don't compare a date to a file size. that's not it, bestie. πŸ™ˆ

Example: 'date > "2020-10-01"' selects all files that were modified after the specified date.

  • LIKE, ILIKE and RLIKE are used for pattern matching in strings.
    • LIKE is case-sensitive, while ILIKE is case-insensitive.
    • The % symbol is the wildcard character that matches any sequence of characters.
    • The _ symbol matches any single character.
    • RLIKE allows matching a regular expression.

Example: '"name like "z%"' selects all files whose name starts with `z'.

  • IN lets you specify multiple values to match. a file gets included if the value of the property matches any of the values in the list. iconic behaviour honestly.

Example: '"type in ("file", "link")' selects all files of type file or link.

  • BETWEEN selects values within a given range (inclusive, so the edges count too πŸ’…).

Example: '"date between "2010" and "2011-01-15"' means that all files that were modified from 2010 to 2011-01-15 will be included.

  • NOT is a logical operator used to negate a condition. it returns true if the condition is false, and vice versa. yes, the hater of operators. 🚫

Example: '"name not like "z%"', '"date not between "2010" and "2011-01-15"', '"type not in ("file", "link")'

  • Values can be numbers, text, date and time, TRUE and FALSE.
    • dates have to be specified in YYYY-MM-DD format
    • times have to be specified in 24h HH:MM:SS format
    • numbers can be written as sizes by appending B, K, M, G and T to specify bytes, KB, MB, GB, and TB.
    • empty strings and 0 evaluate to false

🌈 Properties 🌈

these are the file properties you get to play with:

  • name β€” name of the file
  • path β€” full path of the file
  • container β€” path of the container (if inside an archive)
  • size β€” file size (uncompressed)
  • date β€” modified date in YYYY-MM-DD format
  • time β€” modified time in HH:MM:SS format
  • ext β€” short file extension (e.g., txt)
  • ext2 β€” long file extension (two parts, e.g., tar.gz)
  • type β€” file, dir, or link
  • archive β€” archive type: tar, zip, 7z, rar or empty

⭐ Helper properties ⭐

  • today β€” today's date
  • mo β€” last monday's date
  • tu β€” last tuesday's date
  • we β€” last wednesday's date
  • th β€” last thursday's date
  • fr β€” last friday's date
  • sa β€” last saturday's date
  • su β€” last sunday's date

πŸŽ€ Supported archives πŸŽ€

  • tar β€” .tar, .tar.gz, .tgz, .tar.bz2, .tbz2, .tar.xz, .txz
  • zip β€” .zip
  • 7zip β€” .7z
  • rar β€” .rar
Note: use the flag -n (or –no-archive) to disable archive support. you can also use 'not archive' in your query, but heads up: that still requires zfind to open the archive. it's giving "I said I don't want to look but I looked" 😭

πŸ’… Actions πŸ’…

zfind does not implement actions like find does β€” instead, use xargs -0 to execute commands:

zfind --no-archive 'name like "%.txt"' -0 | xargs -0 -L1 echo

zfind can also produce --csv (or --csv-no-head) that can be piped to other commands. pipe it, queen. 🌸


🧚 CONFIGURATION 🧚

Set the environment variable NO_COLOR to disable color output. (no colors, no drama. well. some drama.)


πŸ‘‘ SEE ALSO πŸ‘‘

find(1), xargs(1).


πŸ’– AUTHORS πŸ’–

zfind is developed by Christian Zangl, see https://github.com/laktak/zfind.

This man page has been written by Daniel Lange <DLange@debian.org> for Debian based on the project's README file.


and that's the whole thing bestie 🫢 this page is from zfind, 2025, and yeah that's the ZFIND(1) moment. go find some files, no cap. βœ¨πŸ’œ

πŸ“¦ where this page comes from