Skip to main content

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

Featurefd (Modern Rust)find (Traditional POSIX)
Primary AudienceDevelopers & Interactive UsersSysadmins & Automated Scripts
Default SpeedExtremely Fast (Parallel multi-threading)Moderate (Single-threaded)
Syntax ComplexityVery Low (fd pattern)High (find . -name "*pattern*")
Hidden FilesIgnored by defaultSearched by default
.gitignore SupportYes (Automatic)No
Case SensitivitySmart Case (Auto-toggles)Strict (Requires -iname)
Regex SupportYes (Default, PCRE-like)Yes (Requires -regex, Emacs style)
Output ColorizationYes (Default)No
Metadata FilteringBasic (Type, Ext, Size, Time)Exhaustive (Perms, UID, GID, Inodes)
POSIX ComplianceNoYes
UbiquityMust be installed manuallyPre-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/ or node_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 .sh script that will run in CI/CD pipelines, Docker containers, or customer servers, fd might not be installed. find is guaranteed to be there.
  • Security Audits: If you need to locate files based on exact octal permissions (e.g., -perm /4000 for SUID binaries) or specific ownership (-user root), fd cannot do this. find is 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 want find's uncompromising traversal.

Summary

Use fd for speed, ergonomics, and code. Use find for portability, security, and administration.