Fd Documentation
A comprehensive, gold-standard guide to mastering fd. fd is a modern, Rust-based alternative to the traditional find command. It is designed to be significantly faster, more intuitive for developers, and inherently aware of modern project structures (like Git repositories).
Curriculum Architecture
This documentation is structured as a progressive curriculum, taking you from core developer workflows to advanced parallel execution.
1. Introduction
Understand why fd was built and how its philosophy differs from POSIX find.
- What is Fd? - Core philosophy and architecture.
- Fd vs. Find - The definitive tool selection guide.
2. Core Syntax
Learn the streamlined, intuitive syntax of fd.
- Anatomy of Fd - The pattern-first command structure.
3. Smart Case & Regex
Master fd's default search behaviors that save keystrokes.
- Smart Case Logic - How
fddynamically toggles case sensitivity. - Regex by Default - Leveraging regular expressions without complex flags.
4. Metadata Filtering
Filter results by file attributes.
- Type and Extension - Fast filtering for files, directories, and specific languages.
- Size and Time - Identifying large files and recently modified assets.
5. Git & Ignore Semantics
Leverage fd's biggest superpower: ignoring what you don't want to see.
- The .gitignore Superpower - Automatic exclusion of build artifacts and
node_modules. - Hidden and Ignored Files - Forcing
fdto search everything when needed.
6. Execution & Batching
Transform search results into automated actions.
- Sequential vs Parallel Execution - Using
-xand-Xfor massive performance gains.
7. Output & Formatting
Control how data is presented to the terminal or downstream scripts.
- Color and Layout - Human-readable output and the
-lflag. - Safe Scripting (Null Bytes) - Using
-0for bulletproof pipelines.
8. Performance & Limits
Tune fd for massive filesystems.
- Depth and Pruning - Restricting traversal scope.
9. Real World Workflows
Production-ready patterns for modern developers.
- Refactoring & Search-Replace - Piping
fdtosedorsd. - Automated Linting - Passing files to formatters.
10. Troubleshooting
Diagnose common issues and distribution quirks.
- The fdfind Alias Problem - Resolving naming conflicts on Debian/Ubuntu.
- Why Can't I Find My File? - Diagnosing hidden file and ignore rules.
11. Cheatsheet
High-density reference for daily operations.
- Fd Cheatsheet - Core syntax, recipes, and fast-lookup tables.
If you are typing find . -type f -name "*pattern*" | grep -v node_modules, you are working too hard. fd pattern does the exact same thing, in parallel, and with colorized output.