find

Search files, directories and text by name, content, type, extension, depth and case.

FilesVersion 1.2.1Stable
lil-terminal

Overview

find combines simple filters instead of multiplying commands: type, extension, depth, case, content search and starting path can be composed to answer a precise filesystem question.

Narrow a search step by step

Build searches from broad to narrow: choose name or text search, then add path, type, extension, depth and case filters.

Syntax

lil-terminal
find <query> [options]

Reference

find <query>

search names recursively in the current directory

find -q <query>

search for a query beginning with -

-f

search files only

-F | -d

search directories only

-h

search the current directory only

-t

search inside text files

-e <ext>

limit files by extension; tar.gz is supported

-php

short form for -e php

-c

use case-sensitive matching

-p <path>

start in another directory

Notes

Flags can be combined, for example find app -f -e json or find source -t -e ini -c. File-only and directory-only modes are mutually exclusive.

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Search inside text files

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Base package

Install the complete package with local command reference and every published mode.

install find
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install find -m
Exact public version

Install exactly this published version.

install find -v 1.2.1
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade find
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install find -u

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Search inside text files
cd \sandbox | find "error" -t -p logs
logs/errors.log
Limit files by extension; tar.gz is supported
find app -f -e json -p config
config/app.json
Short form for -e php
find Calculator -php -p src
src/Calculator.php
Search directories only
find data -F -p .
data/
Search the current directory only
find sample -h -p data
data/.sample-cache
Use case-sensitive matching
find ERROR -t -c -p logs
logs/errors.log
Start in another directory
find app -p config -f
config/app.ini
config/app.json
Search for a query beginning with -
find -q "-draft" -f -p tmp
No matches
Start in another directory
find missing -p no-such-dir
Directory not found: no-such-dir

File used in this example: sandbox/src/Calculator.php

The example uses a file or directory from the protected /sandbox/ documentation workspace.

<?php

declare(strict_types=1);

final class Calculator
{
    public static function add(int $left, int $right): int
    {
        return $left + $right;
    }
}

Related documentation

Current public release

v1.2.12026-08-07

Composable search options

Moves reusable search filters into a dedicated flag group and removes implementation ceilings from short Help.