← Back to tools

fd

A simple, fast and user-friendly alternative to find

Description

fd is a program to find entries in your filesystem. It is a simple, fast, and user-friendly alternative to find. While it does not aim to support all of find's functionality, it provides sensible defaults for the majority of use cases.

Install

homebrewbrew install fd
aptsudo apt install fd-find
pacmansudo pacman -S fd
cargocargo install fd-find

AI Summary

Fast, user-friendly file finder. A modern replacement for find with intuitive syntax, colorized output, and smart defaults like .gitignore awareness.

Capabilities

  • + Fast file and directory search by name pattern
  • + Regex and glob pattern support
  • + Respects .gitignore automatically
  • + Colorized output
  • + Parallel command execution (like find -exec but parallel)
  • + Smart case sensitivity (case-insensitive unless pattern has uppercase)
  • + File type filtering (files, directories, symlinks, executables)

Use When

  • Finding files by name or extension
  • Need a faster, more intuitive alternative to find
  • Listing files to pipe into other commands
  • Running commands on matching files in parallel

Avoid When

  • x Need full find compatibility (complex expressions, -prune)
  • x Searching by file content (use ripgrep instead)
  • x Working in environments where only POSIX tools are available

Usage Patterns

Find files by extension

fd -e py

Find all Python files in current directory tree

Find and delete files

fd -e log --older-than 7d -x rm

Delete log files older than 7 days

Find files matching a pattern

fd 'test.*\.js$'

Find all JavaScript test files using regex

Input / Output

stdin: Not typically used
stdout: File paths, one per line
Exit codes:
0 Matches found
1 No matches found

Typical Pipelines

fd -e rs | xargs wc -l | sort -rn
fd --type f | fzf --preview 'bat --color=always {}'
fd -e json -x jq '.version' {}

Related Tools

View AGENTS.md for fd