# fd

> Fast filesystem search tool that replaces find with regex patterns and smart defaults

Stars: 44.9k · Language: Rust · License: MIT · Categories: Search

- Repository: https://github.com/sharkdp/fd
- Page: https://www.trmn.sh/tools/fd

## Overview

fd is a filesystem search tool that serves as a replacement for the traditional Unix find command. It uses regular expressions by default for pattern matching and provides simplified syntax - searching for a pattern requires only `fd PATTERN` instead of find's more complex syntax like `find -iname '*PATTERN*'`.

The tool includes several convenience features that distinguish it from find. It performs parallelized directory traversal for faster searches, uses smart case sensitivity (case-insensitive by default, switching to case-sensitive when uppercase characters are present), and respects .gitignore patterns automatically. By default, fd ignores hidden files and directories, though this can be overridden with flags like `-H` for hidden files or `-I` to ignore .gitignore patterns.

fd supports command execution on search results through `-x` for parallel execution and `-X` for batch execution. It includes placeholder syntax for file manipulation - `{}` for the full path, `{.}` without extension, `{/}` for basename, and others. The tool also provides colored output to highlight different file types and supports glob patterns with the `-g` flag for exact filename matching.

![fd demo showing filesystem search](https://media.trmn.sh/cached/edc3feae066e2efa1deeab18b7b2d9d4067cbc5ec4bc9421ead1b3582c623d5c.svg)

## Alternatives

- [ripgrep](https://www.trmn.sh/tools/ripgrep.md): Fast line-oriented regex search tool that recursively searches directories with automatic gitignore and binary file filtering (Rust, 69.6k stars)
- [ast-grep](https://www.trmn.sh/tools/ast-grep.md): CLI for structural code search, lint, and rewriting that matches tree-sitter AST nodes using patterns written as ordinary code. Written in Rust. (Rust, 16.4k stars)
- [rga](https://www.trmn.sh/tools/rga.md): Line-oriented search tool that extends ripgrep to search inside PDFs, archives, documents, and multimedia files (Rust, 9.9k stars)
- [skim](https://www.trmn.sh/tools/skim.md): Fuzzy finder written in Rust with interactive search capabilities and shell integration (Rust, 7.0k stars)
- [television](https://www.trmn.sh/tools/television.md): Fuzzy finder for the terminal that searches files, text, git repositories, and custom data sources in real-time (Rust, 6.4k stars)

## Guides

- [Benchmark shell commands with hyperfine](https://www.trmn.sh/guides/benchmark-commands-hyperfine): Time shell commands with hyperfine: warmup runs, cache-clearing with --prepare, side-by-side comparisons, parameter scans and Markdown or JSON export.
- [Swap ls, cat, find and grep for eza, bat, fd and ripgrep](https://www.trmn.sh/guides/modern-unix-replacements): Install eza, bat, fd and ripgrep, learn the side-by-side commands and flag differences, and alias them without breaking your scripts.
- [Modern Replacements for find](https://www.trmn.sh/replace/find): Replace find with fd, bfs or fselect: regex search with smart defaults, a breadth-first drop-in, or SQL-like file queries.

---

Canonical: https://www.trmn.sh/tools/fd
