LinuxCommandLibrary

fdfind

Search for files and directories

TLDR

View documentation for the original command

$ tldr fd
copy

SYNOPSIS

fdfind [OPTIONS] [pattern] [[path] ...]

PARAMETERS

-H, --hidden
    Include hidden files and directories

-i, --ignore-case
    Case-insensitive search

-I, --no-ignore
    Do not respect ignore files (.gitignore, etc.)

-t, --type type
    Filter by file type: file, directory, link, executable

-e, --extension ext
    Match files with specific extension

-a, --absolute-path
    Display absolute paths

-F, --fixed-strings
    Disable regex; treat pattern as literal string

-g, --glob
    Use glob syntax instead of regex

-0, --null
    Separate results with null bytes

-x, --exec command ;
    Execute command on matches (batched)

--exec-batch command ;
    Execute command once per batch of matches

--max-depth N
    Limit search depth

--size +-<>Sz
    Filter by file size

--owner user
    Filter by owner

--sort type
    Sort results (name, size, time, extension)

-S, --smart-case
    Case-sensitive if pattern has uppercase

--follow
    Follow symlinks

--one-file-system
    Don't cross filesystem boundaries

-V, --version
    Display version

-h, --help
    Show help

DESCRIPTION

fdfind (also known as fd outside Debian/Ubuntu) is a simple, fast, and user-friendly command-line tool for searching files by name. Written in Rust, it prioritizes speed and ease of use over the complexity of the traditional find(1) utility.

Key features include: default filename-only searches (no need for -name), intelligent case-insensitivity with --smart-case, automatic colorized output for better readability, respect for standard ignore files like .gitignore and .ignore, and parallel directory traversal for performance. It supports regex and glob patterns, file type filtering, size/owner constraints, and execution of commands on matches via --exec.

Unlike find, fdfind skips binary files and hidden directories by default, making it ideal for source code and text file searches. It's particularly popular among developers for quickly locating files in large projects, outperforming find significantly on SSDs and modern hardware. Output is null-delimited compatible for scripting, and it integrates well with tools like fzf for interactive selection.

CAVEATS

fdfind skips permission-denied errors silently; lacks some advanced find(1) predicates like complex expressions. Not installed by default; use package managers (apt install fdfind).

CONFIGURATION

Respects ~/.config/fd/ignore and VCS ignore files. Color scheme via ~/.config/fd/colors.toml.

EXAMPLES

fdfind .py (find Python files)
fdfind -t f -g '*.txt' /path (glob text files)
fdfind -e rs --exec bat {} ; (view Rust files)

HISTORY

Developed by David Peter (sharkdp) in Rust; first released in 2016. Renamed fdfind in Debian due to naming conflict with another package. Actively maintained with versions aligning to fd upstream.

SEE ALSO

find(1), locate(1), ripgrep(1), ack(1)

Copied to clipboard