Speed Up File Searching with fd: Replace find for Better Performance

User avatar placeholder
Written by Tamzid Ahmed

June 1, 2026

Tired of slow find commands slowing down your workflow? Discover how to replace find with fd for lightning-fast file searches. This modern tool, built in Rust, delivers superior speed and simplicity for developers.

Why Replace find with fd?

find is a powerful but often slow command-line tool for searching files. Its complexity and default settings (like case-sensitive searches) can hinder productivity. fd, a Rust-based alternative, addresses these issues with built-in optimizations for speed and usability.

Speed and Simplicity

fd typically runs 2-10x faster than find by leveraging Rust’s performance and intelligent defaults. It automatically skips hidden directories (like .git), ignores case by default, and uses parallel processing for large directories. These features make it ideal for developers who need quick results without complex flags. In benchmark tests, fd completes searches in 0.2 seconds where find takes 2.5 seconds for the same directory.

Installing fd

fd is available on most platforms. Here’s how to install it:

  • macOS (Homebrew): brew install fd
  • Ubuntu/Debian: sudo apt install fd-find (then use fd command)
  • Windows (Scoop): scoop install fd or choco install fd
  • From source: cargo install fd (requires Rust)

After installation, verify with fd --version. Most distributions package it as fd-find but the command remains fd.

Key Commands: fd vs find

Switching to fd is straightforward. Here are common use cases with equivalent commands:

  • Find all .txt files: find . -name "*.txt"fd "txt"
  • Search for .js files modified in the last 7 days: find . -type f -name "*.js" -mtime -7fd -e js -t f --changed-within 7d
  • Exclude .git directories: find . -path ./.git -prune -o -name "*.py"fd "py" (fd skips .git by default)
  • Case-insensitive search: find . -iname "readme"fd "readme" (fd is case-insensitive by default)
  • Search for directories only: find . -type d -name "src"fd -t d "src"

Practical Examples

Let’s apply fd to real-world scenarios:

Searching for all configuration files in the current directory:

fd "conf" -t f finds files containing “conf” in their name, ignoring directories. This is perfect for locating config.json or .env files quickly.

Searching for Python files in a specific directory:

fd -e py ~/projects searches for .py files in the ~/projects directory. The -e flag specifies the extension, and fd automatically searches recursively.

Advanced Tips

Combine fd with other tools for maximum efficiency:

  • Use with ripgrep for code search: fd "src" | xargs rg "function" finds all files in “src” and searches for “function” within them.
  • Pipe results to bat for syntax-highlighted output: fd "log" | xargs bat displays log files with syntax highlighting.
  • Integrate with fzf for interactive selection: fd . | fzf lets you interactively choose files from the search results.

These combinations create a powerful workflow for developers, reducing time spent on repetitive tasks. For example, using fd to find files and rg to search within them can cut down code search time by over 50% compared to traditional methods.

Conclusion

Replacing find with fd is a simple yet powerful upgrade for developer workflows. Its speed, intuitive syntax, and smart defaults make it a must-have tool for anyone working in the terminal. Start using fd today to save time and boost productivity—install it, try a few commands, and experience the difference in your daily workflow.

Leave a Comment