Fd vs. Find
While fd is marketed as an alternative to find, it is not a 1:1 drop-in replacement. Understanding the strengths and limitations of each tool is critical for professional CLI workflows.
The Definitive Comparison
| Feature | fd (Modern Rust) | find (Traditional POSIX) |
|---|---|---|
| Primary Audience | Developers & Interactive Users | Sysadmins & Automated Scripts |
| Default Speed | Extremely Fast (Parallel multi-threading) | Moderate (Single-threaded) |
| Syntax Complexity | Very Low (fd pattern) | High (find . -name "*pattern*") |
| Hidden Files | Ignored by default | Searched by default |
| .gitignore Support | Yes (Automatic) | No |
| Case Sensitivity | Smart Case (Auto-toggles) | Strict (Requires -iname) |
| Regex Support | Yes (Default, PCRE-like) | Yes (Requires -regex, Emacs style) |
| Output Colorization | Yes (Default) | No |
| Metadata Filtering | Basic (Type, Ext, Size, Time) | Exhaustive (Perms, UID, GID, Inodes) |
| POSIX Compliance | No | Yes |
| Ubiquity | Must be installed manually | Pre-installed on every UNIX system |
When to use fd
You should reach for fd for interactive terminal sessions and developer workflows.
- Searching for a specific class or configuration file within a large Git repository.
- Piping a list of source files to
sed,rg, or a linter. - Quickly finding large files without having to remember the exact syntax for
find . -type f -size +1G. - When you explicitly do not want to search inside
.git/ornode_modules/.
When to use find
You must stick with find for system administration, strict auditing, and portable shell scripting.
- Portable Scripts: If you are writing a
.shscript that will run in CI/CD pipelines, Docker containers, or customer servers,fdmight not be installed.findis guaranteed to be there. - Security Audits: If you need to locate files based on exact octal permissions (e.g.,
-perm /4000for SUID binaries) or specific ownership (-user root),fdcannot do this.findis required. - Full System Sweeps: When you need a 100% guarantee that a file does not exist anywhere on the disk,
fd's helpful habit of ignoring hidden directories can result in false negatives. You wantfind's uncompromising traversal.
Summary
Use fd for speed, ergonomics, and code. Use find for portability, security, and administration.