← All posts

CLI

fd: A Simpler, Faster Way to Find Files

fd is a fast, friendly alternative to find - intuitive syntax, sensible defaults, and gitignore-aware output.

F CLI

The classic find is powerful and almost nobody remembers its syntax. fd is the friendly alternative: you type what you're looking for, and it searches recursively from the current directory with sensible defaults - case-insensitive smart matching, colorized output, and respect for your .gitignore so build artifacts and dependencies don't drown the results.

Syntax You Can Actually Remember

Compare the mental overhead. Where find wants a small incantation, fd wants the pattern:

# Find files matching a pattern fd routing # Only .php files, run a command on each fd -e php -x phpcs # Include ignored and hidden files fd -HI secret

Fast and Composable

fd is quick on large trees and pairs naturally with other tools - pipe its results into fzf to pick one interactively, or use -x/-X to run a command per result or batched. It's the file-finding half of a modern CLI setup.

Rough Edges and Limitations

  • Not a full find replacement. find's exotic predicates exist for a reason; fd covers the common 95 percent, not every edge.
  • Gitignore-aware by default. Same gotcha as ripgrep - use -HI when you truly want everything.
  • Different flags. Muscle memory from find won't transfer; the trade is worth it.

For the everyday "where is that file" question, fd is faster to type and faster to run - a small daily win that adds up.

Internal link suggestion: link "pipe its results into fzf" to the fzf post, its constant companion.