TL;DR — Quick Summary
fd is a fast, user-friendly alternative to find. Simple syntax, regex by default, .gitignore aware, colorized output. Just fd pattern instead of find . -name.
fd makes finding files simple. Instead of find . -name '*.rs' -type f, just type fd -e rs. It’s faster, cleaner, and just works.
Installation
# macOS
brew install fd
# Arch Linux
sudo pacman -S fd
# Ubuntu/Debian (binary is fdfind)
sudo apt install fd-find
# ln -s $(which fdfind) ~/.local/bin/fd
# Cargo
cargo install fd-find
Usage
# Find by pattern (regex)
fd 'main'
fd '\.config$'
fd 'test.*spec'
# By extension
fd -e rs
fd -e ts
fd -e md
# By type
fd -t f # Files only
fd -t d # Directories only
fd -t l # Symlinks only
fd -t x # Executables only
# Include hidden / ignored
fd --hidden 'rc$'
fd --no-ignore 'node_modules'
# Specific directory
fd -e py /usr/lib/python3
# Max depth
fd -d 2 -e json
# Exclude patterns
fd -E '*.test.ts' -E 'vendor'
# Execute on results
fd -e py -x wc -l {} # Line count per file
fd -e jpg -X zip photos.zip {} # Batch into zip
fd -e ts -x prettier --write {} # Format all TS files
# Size filter
fd -S +1M # Files larger than 1MB
fd -S -100k -e log # Log files under 100KB
# Changed time
fd --changed-within 1d # Modified today
fd --changed-before 1w # Modified over a week ago
Comparison
| Feature | fd | find | locate |
|---|---|---|---|
| Speed | 5-10x faster | Baseline | Index-based |
| Syntax | Simple | Verbose | Simple |
| .gitignore | Yes | No | No |
| Regex | Default | -regex | Pattern |
| Color | Yes | No | No |
| Smart case | Yes | No | -i |
Summary
- fd finds files with simple, intuitive syntax —
fd patternvsfind . -name - 5-10x faster than find, written in Rust with parallel traversal
- .gitignore-aware, smart case, colorized output by default
- Extension, type, size, and time filters built-in
- Execute commands on results with -x (per-file) and -X (batch)