fd

Updated

July 31, 2026

Overview

fd is a simple, fast, and user-friendly alternative to find. It features colorized output, sensible defaults (ignoring hidden files and .gitignore patterns by default), parallel directory traversal, and intuitive regex search patterns.

Syntax

fd [options] [pattern] [path...]

Common Options

Option Description
-e, --extension EXT Filter results by file extension
-t, --type TYPE Filter by type: f (file), d (directory), l (symlink), x (executable)
-H, --hidden Include hidden files and directories in search
-I, --no-ignore Do not respect .gitignore rules
-x, --exec CMD Execute a command for each search result
-X, --exec-batch CMD Execute a command with all search results passed as arguments

Key Use Cases

  1. Finding files by extension or pattern quickly without complex find syntax.
  2. Running operations on matching files using -x or -X.
  3. Quick discovery of nested project subdirectories.

Examples with Explanations

Example 1: Finding Files by Extension

fd -e md

Finds all Markdown (.md) files under the current directory.

Example 2: Regex Name Matching

fd "config.*\.yml$"

Searches for files matching the regular expression config.*\.yml$.

Example 3: Executing Commands on Found Files

fd -e log -x rm

Finds all .log files and deletes them using rm.