fd — A Simple Fast User-Friendly Alternative to find
fd is a simple, fast, and user-friendly alternative to the venerable find command. Written in Rust with smart defaults: color output, gitignore-aware, parallel traversal, and intuitive syntax. Used by VS Code, Helix, and many dev tools.
What it is
fd is a command-line tool written in Rust that finds files and directories. It provides a simpler syntax and smarter defaults compared to the traditional find command. Features include colorized output, automatic gitignore filtering, regex patterns by default, and parallel directory traversal.
The tool targets developers and system administrators who use file search frequently and want faster results with less typing. It is used internally by VS Code, Helix editor, and many developer tools.
How it saves time or tokens
fd requires less typing than find for common operations. Where find needs -name '*.js' -type f, fd uses -e js. It automatically respects .gitignore files, so search results exclude build artifacts and dependencies without manual exclusion patterns.
Parallel directory traversal makes fd significantly faster than find on large directory trees, especially on SSDs. The speed difference grows with directory depth and file count.
How to use
- Install with your package manager:
brew install fd(macOS),sudo apt install fd-find(Debian), orcargo install fd-find. - Run
fd patternto search for files matching a regex pattern in the current directory. - Add flags for extensions (
-e js), file types (-t ffor files,-t dfor directories), or hidden files (-H).
Example
# Find files matching a pattern
fd pattern
# Find by extension
fd -e js
fd -e md -e mdx
# Include hidden files
fd -H config
# Find directories only
fd -t d src
# Execute command per match
fd -e log -x gzip {}
# Search specific path
fd pattern path/to/search
# Ignore gitignore rules
fd -I pattern
Related on TokRepo
- Automation tools -- CLI utilities for developer productivity
- AI tools for coding -- Developer tools and code search
Common pitfalls
- On Debian and Ubuntu, the binary is named
fdfindinstead offddue to a naming conflict with another package. Create an alias withalias fd=fdfindin your shell config. - fd ignores hidden files and directories by default. Use the
-Hflag to include dotfiles like .env, .config, or .git contents. - fd respects .gitignore by default. If you need to find files inside node_modules or build directories, add the
-Iflag to disable gitignore filtering.
Frequently Asked Questions
fd is typically 2-10x faster than find due to parallel directory traversal and Rust's efficient I/O. The difference is most noticeable on large directory trees with thousands of files. On small directories, both tools are fast enough that speed is not a factor.
Yes. fd uses regex patterns by default. Type fd 'test.*\.js$' to find files matching a regex. For simple glob-like patterns, the regex is usually just the search term. Use -g for glob mode if you prefer glob syntax.
fd can replace find for most file search tasks but has a different flag syntax. Existing scripts using find need modification. fd also has a different default behavior (ignoring hidden files and gitignored paths) which may change results compared to find.
Yes. fd supports Windows, Linux, and macOS. On Windows, install via scoop (scoop install fd) or chocolatey. The tool handles Windows path separators and case sensitivity correctly.
fd reads .gitignore, .fdignore, and .ignore files and excludes matching paths from results. This happens automatically. To disable this behavior and search all files, use the -I (no-ignore) flag. You can also create .fdignore files for fd-specific exclusions.
Citations (3)
- fd GitHub— fd is a simple fast user-friendly alternative to find written in Rust
- fd README— Used by VS Code and Helix editor
- fd Benchmarks— Parallel directory traversal using Rust
Related on TokRepo
Discussion
Related Assets
Conda — Cross-Platform Package and Environment Manager
Install, update, and manage packages and isolated environments for Python, R, C/C++, and hundreds of other languages from a single tool.
Sphinx — Python Documentation Generator
Generate professional documentation from reStructuredText and Markdown with cross-references, API autodoc, and multiple output formats.
Neutralinojs — Lightweight Cross-Platform Desktop Apps
Build desktop applications with HTML, CSS, and JavaScript using a tiny native runtime instead of bundling Chromium.