fd

A simple, fast, and user-friendly alternative to the Unix find command.

Screenshot of fd

fd is a fast and user-friendly alternative to the Unix find command. While find is powerful, its syntax is often arcane and easy to get wrong. fd trades some of that raw flexibility for a much cleaner interface, smarter defaults, and significantly faster performance.

Features

  • Intuitive syntaxfd PATTERN just works, no flags required for the common case
  • Regex and glob support — search by regex by default, or switch to glob with -g
  • Respects .gitignore — skips hidden and ignored files automatically, just like ripgrep
  • Colored output — file types are distinguished by color out of the box
  • Parallel execution — run a command on each result in parallel with -x or -X
  • Smart case — search is case-insensitive unless the pattern contains uppercase letters
  • Fast — built on ignore and crossbeam, searches large trees very quickly

Installation

cargo install fd-find

Note: the crate is named fd-find to avoid a conflict with an existing package, but the binary is still called fd.

# Debian/Ubuntu
apt install fd-find
# then alias: ln -s $(which fdfind) ~/.local/bin/fd

# macOS
brew install fd

# Arch Linux
pacman -S fd

Usage

# Find all files matching a pattern (regex by default)
fd netfl

# Find files with a specific extension
fd -e rs

# Find files in a specific directory
fd config ~/.config

# Case-sensitive search
fd --case-sensitive MyComponent

# Show hidden and gitignored files too
fd -H -I build

# Execute a command on each result
fd -e png -x convert {} {.}.jpg

# Execute a command on all results at once (like xargs)
fd -e log -X rm

# Find directories only
fd -t d src

# Find files modified in the last 2 days
fd -t f --changed-within 2d

Comparison with find

# find                              # fd equivalent
find . -name '*.rs'                 fd -e rs
find . -type f -name 'foo*'         fd -t f '^foo'
find . -not -path '*/node_modules'  fd  (ignored automatically)
find . -mtime -1                    fd --changed-within 1d