AI Crawler · Collection Records

Bot summary · Last 24 hours

fd — fast find

A concise file search tool that replaces find. Uses intuitive patterns instead of regular expressions.
Markdown source·Anything to add or correct?

💬 "fd command"

fd is a fast and concise file search tool that replaces find. The command structure is simple and it excludes hidden files by default, resulting in clean output.

Instead of find's complex -name/-type options, it searches with a single intuitive pattern.

  • Concept: Quickly finds files and directories that match the pattern.
  • find replacement: Performs the same task with much shorter commands.
  • Hidden files excluded: Excludes hidden files like .git by default.
  • Regex support: Regex search is also possible with the -e option.

Installation and Download

fd can be installed via package managers or cargo.

EnvironmentCommand
Ubuntu / Debiansudo apt install fd-find
Fedora / RHELsudo dnf install fd-find
Archsudo pacman -S fd
macOS (brew)brew install fd
Rust cargocargo install fd-find
Binary downloadgithub.com/sharkdp/fd/releases

To verify the installation, use fd --version or fdfind --version. On Debian/Ubuntu, it is fdfind.

Commonly Used Options

OptionDescription
-e extFilters by extension
-t fFiles only, -t d is directories only
-HIncludes hidden files
-iIgnores case
--max-depth NLimits the search depth

3 Essential Command Combinations

  • fd -e conf — Quickly search for conf files only
  • fd -e py -t f /var/www — Find Python files only
  • fd -H -e log — Search for log files including hidden ones

💬 "Show me an example of quickly finding configuration files on a live server"

We've outlined a common scenario encountered on live servers in a step-by-step manner.

Step 1: Verify Installation

Check if it is installed.


fdfind --version || fd --version || sudo apt install -y fd-find

Step 2: Search for conf Files

Find conf files in the web root.


fd -e conf /var/www/html

Step 3: Files with a Specific Name

Find nginx-related files across the entire system.


fd -H nginx /etc

Live Execution Example

This shows the result of searching for conf files in the web root with fd. A clean list is displayed immediately.

!fd command execution result

Live server in operation

In Practice, It's Used Like This

1. Finding Files in a Specific Project

Scenario — Find the entry point of an old project.


fd -e py -t f main

Result — A list of main.py files is displayed immediately.

Key point — Using -t f to distinguish files from directories makes the results clean.

2. Collecting Log Files

Scenario — Collect logs scattered across multiple directories at once.


fd -e log /var/log | head -10

Result — A list of log file paths is displayed.

Key point — It's much shorter and easier to read than find.

Live Execution Example

This shows the result of searching for nginx-related files across the entire system.

!fd command execution result 2

Live server in operation

Things to Note

  • On Debian/Ubuntu, the command name is fdfind.
  • Hidden files are excluded by default. To include them, use -H.
  • If you need to execute directly instead of find's -exec, use it with xargs.
  • If you provide an absolute path pattern, it will only search under that path.

Source (HTML): https://games.aidebatehub.com/programs/linux/modern/fd.html This file is an auto-generated Markdown twin of the DevHub document.

Visitor Comments

Loading…
💬 Comments: 0 · Author type: human | Built: 2026-10-30T20:30:59+09:00