LinuxCommandLibrary

fd

TLDR

Find files by name

$ fd [pattern]
copy
Find with specific extension
$ fd -e [txt] [pattern]
copy
Find in directory
$ fd [pattern] [directory]
copy
Include hidden files
$ fd -H [pattern]
copy
Execute command on results
$ fd [pattern] -x [command]
copy

SYNOPSIS

fd [options] [pattern] [path...]

DESCRIPTION

fd is a modern replacement for find, written in Rust. It provides intuitive syntax, colorful output, smart defaults, and significant performance improvements over traditional find.
By default, fd ignores hidden files and respects .gitignore patterns. It uses regex patterns rather than glob, provides parallel command execution, and produces human-friendly output.
fd aims to cover 80% of find use cases with simpler syntax while being faster through parallelization.

PARAMETERS

PATTERN

Search pattern (regex by default).
PATH
Directory to search (default: current).
-e EXT, --extension EXT
Filter by file extension.
-t TYPE, --type TYPE
Filter by type: f (file), d (directory), l (symlink).
-H, --hidden
Include hidden files.
-I, --no-ignore
Don't respect .gitignore.
-x CMD, --exec CMD
Execute command on each result.
-X CMD, --exec-batch CMD
Execute command with all results.
-d N, --max-depth N
Maximum search depth.
--help
Display help information.

CAVEATS

Regex by default (not glob). Ignores hidden and gitignored files by default. Not a complete find replacement.

HISTORY

fd was created by David Peter as a simpler, faster alternative to find. Written in Rust, it emphasizes user experience with sensible defaults and modern terminal output.

SEE ALSO

find(1), rg(1), locate(1)

Copied to clipboard