[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1077":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":16,"starSnapshotCount":16,"syncStatus":38,"lastSyncTime":39,"discoverSource":40},1077,"fd","sharkdp\u002Ffd","sharkdp","A simple, fast and user-friendly alternative to 'find'","",null,"Rust",43308,1067,151,127,0,17,76,390,67,44.09,"Apache License 2.0",false,"master",[26,27,28,29,30,31,32,33,34],"cli","command-line","filesystem","hacktoberfest","regex","rust","search","terminal","tool","2026-06-12 02:00:22","# fd\n\n[![CICD](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Ffd\u002Factions\u002Fworkflows\u002FCICD.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Ffd\u002Factions\u002Fworkflows\u002FCICD.yml)\n[![Version info](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Ffd-find.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Ffd-find)\n[[中文](https:\u002F\u002Fgithub.com\u002Fcha0ran\u002Ffd-zh)]\n[[한국어](https:\u002F\u002Fgithub.com\u002Fspearkkk\u002Ffd-kor)]\n\n`fd` is a program to find entries in your filesystem.\nIt is a simple, fast and user-friendly alternative to [`find`](https:\u002F\u002Fwww.gnu.org\u002Fsoftware\u002Ffindutils\u002F).\nWhile it does not aim to support all of `find`'s powerful functionality, it provides sensible\n(opinionated) defaults for a majority of use cases.\n\n[Installation](#installation) • [How to use](#how-to-use) • [Troubleshooting](#troubleshooting)\n\n## Features\n\n* Intuitive syntax: `fd PATTERN` instead of `find -iname '*PATTERN*'`.\n* Regular expression (default) and glob-based patterns.\n* [Very fast](#benchmark) due to parallelized directory traversal.\n* Uses colors to highlight different file types (same as `ls`).\n* Supports [parallel command execution](#command-execution)\n* Smart case: the search is case-insensitive by default. It switches to\n  case-sensitive if the pattern contains an uppercase\n  character[\\*](http:\u002F\u002Fvimdoc.sourceforge.net\u002Fhtmldoc\u002Foptions.html#'smartcase').\n* Ignores hidden directories and files, by default.\n* Ignores patterns from your `.gitignore`, by default.\n* The command name is *50%* shorter[\\*](https:\u002F\u002Fgithub.com\u002Fggreer\u002Fthe_silver_searcher) than\n  `find` :-).\n\n## Demo\n\n![Demo](doc\u002Fscreencast.svg)\n\n## How to use\n\nFirst, to get an overview of all available command line options, you can either run\n[`fd -h`](#command-line-options) for a concise help message or `fd --help` for a more detailed\nversion.\n\n### Simple search\n\n*fd* is designed to find entries in your filesystem. The most basic search you can perform is to\nrun *fd* with a single argument: the search pattern. For example, assume that you want to find an\nold script of yours (the name included `netflix`):\n``` bash\n> fd netfl\nSoftware\u002Fpython\u002Fimdb-ratings\u002Fnetflix-details.py\n```\nIf called with just a single argument like this, *fd* searches the current directory recursively\nfor any entries that *contain* the pattern `netfl`.\n\n### Regular expression search\n\nThe search pattern is treated as a regular expression. Here, we search for entries that start\nwith `x` and end with `rc`:\n``` bash\n> cd \u002Fetc\n> fd '^x.*rc$'\nX11\u002Fxinit\u002Fxinitrc\nX11\u002Fxinit\u002Fxserverrc\n```\n\nThe regular expression syntax used by `fd` is [documented here](https:\u002F\u002Fdocs.rs\u002Fregex\u002Flatest\u002Fregex\u002F#syntax).\n\n### Specifying the root directory\n\nIf we want to search a specific directory, it can be given as a second argument to *fd*:\n``` bash\n> fd passwd \u002Fetc\n\u002Fetc\u002Fdefault\u002Fpasswd\n\u002Fetc\u002Fpam.d\u002Fpasswd\n\u002Fetc\u002Fpasswd\n```\n\n### List all files, recursively\n\n*fd* can be called with no arguments. This is very useful to get a quick overview of all entries\nin the current directory, recursively (similar to `ls -R`):\n``` bash\n> cd fd\u002Ftests\n> fd\ntestenv\ntestenv\u002Fmod.rs\ntests.rs\n```\n\nIf you want to use this functionality to list all files in a given directory, you have to use\na catch-all pattern such as `.` or `^`:\n``` bash\n> fd . fd\u002Ftests\u002F\ntestenv\ntestenv\u002Fmod.rs\ntests.rs\n```\n\n### Searching for a particular file extension\n\nOften, we are interested in all files of a particular type. This can be done with the `-e` (or\n`--extension`) option. Here, we search for all Markdown files in the fd repository:\n``` bash\n> cd fd\n> fd -e md\nCONTRIBUTING.md\nREADME.md\n```\n\nThe `-e` option can be used in combination with a search pattern:\n``` bash\n> fd -e rs mod\nsrc\u002Ffshelper\u002Fmod.rs\nsrc\u002Flscolors\u002Fmod.rs\ntests\u002Ftestenv\u002Fmod.rs\n```\n\n### Searching for a particular file name\n\n To find files with exactly the provided search pattern, use the `-g` (or `--glob`) option:\n``` bash\n> fd -g libc.so \u002Fusr\n\u002Fusr\u002Flib32\u002Flibc.so\n\u002Fusr\u002Flib\u002Flibc.so\n```\n\n### Hidden and ignored files\nBy default, *fd* does not search hidden directories and does not show hidden files in the\nsearch results. To disable this behavior, we can use the `-H` (or `--hidden`) option:\n``` bash\n> fd pre-commit\n> fd -H pre-commit\n.git\u002Fhooks\u002Fpre-commit.sample\n```\n\nIf we work in a directory that is a Git repository (or includes Git repositories), *fd* does not\nsearch folders (and does not show files) that match one of the `.gitignore` patterns. To disable\nthis behavior, we can use the `-I` (or `--no-ignore`) option:\n``` bash\n> fd num_cpu\n> fd -I num_cpu\ntarget\u002Fdebug\u002Fdeps\u002Flibnum_cpus-f5ce7ef99006aa05.rlib\n```\n\nTo really search *all* files and directories, simply combine the hidden and ignore features to show\neverything (`-HI`) or use `-u`\u002F`--unrestricted`.\n\n### Matching the full path\nBy default, *fd* only matches the filename of each file. However, using the `--full-path` or `-p` option,\nyou can match against the full path.\n\n```bash\n> fd -p -g '**\u002F.git\u002Fconfig'\n> fd -p '.*\u002Flesson-\\d+\u002F[a-z]+.(jpg|png)'\n```\n\n### Command execution\n\nInstead of just showing the search results, you often want to *do something* with them. `fd`\nprovides two ways to execute external commands for each of your search results:\n\n* The `-x`\u002F`--exec` option runs an external command *for each of the search results* (in parallel).\n* The `-X`\u002F`--exec-batch` option launches the external command once, with *all search results as arguments*.\n\n#### Examples\n\nRecursively find all zip archives and unpack them:\n``` bash\nfd -e zip -x unzip\n```\nIf there are two such files, `file1.zip` and `backup\u002Ffile2.zip`, this would execute\n`unzip file1.zip` and `unzip backup\u002Ffile2.zip`. The two `unzip` processes run in parallel\n(if the files are found fast enough).\n\nFind all `*.h` and `*.cpp` files and auto-format them inplace with `clang-format -i`:\n``` bash\nfd -e h -e cpp -x clang-format -i\n```\nNote how the `-i` option to `clang-format` can be passed as a separate argument. This is why\nwe put the `-x` option last.\n\nAny positional arguments after `-x` belong to the command template, not to `fd` itself. If you\nalso want to pass a pattern or search path, put `-x` last:\n``` bash\nfd pattern path -x echo\n```\n\nFind all `test_*.py` files and open them in your favorite editor:\n``` bash\nfd -g 'test_*.py' -X vim\n```\nNote that we use capital `-X` here to open a single `vim` instance. If there are two such files,\n`test_basic.py` and `lib\u002Ftest_advanced.py`, this will run `vim test_basic.py lib\u002Ftest_advanced.py`.\n\nTo see details like file permissions, owners, file sizes etc., you can tell `fd` to show them\nby running `ls` for each result:\n``` bash\nfd … -X ls -lhd --color=always\n```\nThis pattern is so useful that `fd` provides a shortcut. You can use the `-l`\u002F`--list-details`\noption to execute `ls` in this way: `fd … -l`.\n\nThe `-X` option is also useful when combining `fd` with [ripgrep](https:\u002F\u002Fgithub.com\u002FBurntSushi\u002Fripgrep\u002F) (`rg`) in order to search within a certain class of files, like all C++ source files:\n```bash\nfd -e cpp -e cxx -e h -e hpp -X rg 'std::cout'\n```\n\nConvert all `*.jpg` files to `*.png` files:\n``` bash\nfd -e jpg -x convert {} {.}.png\n```\nHere, `{}` is a placeholder for the search result. `{.}` is the same, without the file extension.\nSee below for more details on the placeholder syntax.\n\nThe terminal output of commands run from parallel threads using `-x` will not be interlaced or garbled,\nso `fd -x` can be used to rudimentarily parallelize a task run over many files.\nAn example of this is calculating the checksum of each individual file within a directory.\n```\nfd -tf -x md5sum > file_checksums.txt\n```\n\n#### Placeholder syntax\n\nThe `-x` and `-X` options take a *command template* as a series of arguments (instead of a single string).\nIf you want to add additional options to `fd` after the command template, you can terminate it with a `\\;`.\n\nFor example, `fd -x echo \\; pattern path` treats `pattern path` as `fd` arguments instead of\npassing them to `echo`. In practice, it is often clearer to write `fd pattern path -x echo`.\n\nThe syntax for generating commands is similar to that of [GNU Parallel](https:\u002F\u002Fwww.gnu.org\u002Fsoftware\u002Fparallel\u002F):\n\n- `{}`: A placeholder token that will be replaced with the path of the search result\n  (`documents\u002Fimages\u002Fparty.jpg`).\n- `{.}`: Like `{}`, but without the file extension (`documents\u002Fimages\u002Fparty`).\n- `{\u002F}`: A placeholder that will be replaced by the basename of the search result (`party.jpg`).\n- `{\u002F\u002F}`: The parent of the discovered path (`documents\u002Fimages`).\n- `{\u002F.}`: The basename, with the extension removed (`party`).\n\nIf you do not include a placeholder, *fd* automatically adds a `{}` at the end.\n\n#### Parallel vs. serial execution\n\nFor `-x`\u002F`--exec`, you can control the number of parallel jobs by using the `-j`\u002F`--threads` option.\nUse `--threads=1` for serial execution.\n\n### Excluding specific files or directories\n\nSometimes we want to ignore search results from a specific subdirectory. For example, we might\nwant to search all hidden files and directories (`-H`) but exclude all matches from `.git`\ndirectories. We can use the `-E` (or `--exclude`) option for this. It takes an arbitrary glob\npattern as an argument:\n``` bash\n> fd -H -E .git …\n```\n\nWe can also use this to skip mounted directories:\n``` bash\n> fd -E \u002Fmnt\u002Fexternal-drive …\n```\n\n.. or to skip certain file types:\n``` bash\n> fd -E '*.bak' …\n```\n\nTo make exclude-patterns like these permanent, you can create a `.fdignore` file. They work like\n`.gitignore` files, but are specific to `fd`. For example:\n``` bash\n> cat ~\u002F.fdignore\n\u002Fmnt\u002Fexternal-drive\n*.bak\n```\n\n> [!NOTE]\n> `fd` also supports `.ignore` files that are used by other programs such as `rg` or `ag`.\n\nIf you want `fd` to ignore these patterns globally, you can put them in `fd`'s global ignore file.\nThis is usually located in `~\u002F.config\u002Ffd\u002Fignore` in macOS or Linux, and `%APPDATA%\\fd\\ignore` in\nWindows.\n\nYou may wish to include `.git\u002F` in your `fd\u002Fignore` file so that `.git` directories, and their contents\nare not included in output if you use the `--hidden` option.\n\n### Deleting files\n\nYou can use `fd` to remove all files and directories that are matched by your search pattern.\nIf you only want to remove files, you can use the `--exec-batch`\u002F`-X` option to call `rm`. For\nexample, to recursively remove all `.DS_Store` files, run:\n``` bash\n> fd -H '^\\.DS_Store$' -tf -X rm\n```\nIf you are unsure, always call `fd` without `-X rm` first. Alternatively, use `rm`s \"interactive\"\noption:\n``` bash\n> fd -H '^\\.DS_Store$' -tf -X rm -i\n```\n\nIf you also want to remove a certain class of directories, you can use the same technique. You will\nhave to use `rm`s `--recursive`\u002F`-r` flag to remove directories.\n\n> [!NOTE]\n> There are scenarios where using `fd … -X rm -r` can cause race conditions: if you have a\npath like `…\u002Ffoo\u002Fbar\u002Ffoo\u002F…` and want to remove all directories named `foo`, you can end up in a\nsituation where the outer `foo` directory is removed first, leading to (harmless) *\"'foo\u002Fbar\u002Ffoo':\nNo such file or directory\"* errors in the `rm` call.\n\n### Command-line options\n\nThis is the output of `fd -h`. To see the full set of command-line options, use `fd --help` which\nalso includes a much more detailed help text.\n\n```\nUsage: fd [OPTIONS] [pattern [path]...]\n\nArguments:\n  [pattern]  the search pattern (a regular expression, unless '--glob' is used; optional)\n  [path]...  the root directories for the filesystem search (optional)\n\nOptions:\n  -H, --hidden                     Search hidden files and directories\n  -I, --no-ignore                  Do not respect .(git|fd)ignore files\n  -s, --case-sensitive             Case-sensitive search (default: smart case)\n  -i, --ignore-case                Case-insensitive search (default: smart case)\n  -g, --glob                       Glob-based search (default: regular expression)\n  -a, --absolute-path              Show absolute instead of relative paths\n  -l, --list-details               Use a long listing format with file metadata\n  -L, --follow                     Follow symbolic links\n  -p, --full-path                  Search full abs. path (default: filename only)\n  -d, --max-depth \u003Cdepth>          Set maximum search depth (default: none)\n  -E, --exclude \u003Cglob>             Exclude entries that match the given glob pattern\n  -t, --type \u003Cfiletype>            Filter by type: file (f), directory (d\u002Fdir), symlink (l),\n                                   executable (x), empty (e), socket (s), pipe (p), char-device\n                                   (c), block-device (b)\n  -e, --extension \u003Cext>            Filter by file extension\n  -S, --size \u003Csize>                Limit results based on the size of files\n      --changed-within \u003Cdate|dur>  Filter by file modification time (newer than)\n      --changed-before \u003Cdate|dur>  Filter by file modification time (older than)\n  -o, --owner \u003Cuser:group>         Filter by owning user and\u002For group\n      --format \u003Cfmt>               Print results according to template\n  -x, --exec \u003Ccmd>...              Execute a command for each search result\n  -X, --exec-batch \u003Ccmd>...        Execute a command with all search results at once\n  -c, --color \u003Cwhen>               When to use colors [default: auto] [possible values: auto,\n                                   always, never]\n      --hyperlink[=\u003Cwhen>]         Add hyperlinks to output paths [default: never] [possible\n                                   values: auto, always, never]\n      --ignore-contain \u003Cname>      Ignore directories containing the named entry\n  -h, --help                       Print help (see more with '--help')\n  -V, --version                    Print version\n```\n\nNote that options can be given after the pattern and\u002For path as well.\n\n## Benchmark\n\nLet's search my home folder for files that end in `[0-9].jpg`. It contains ~750.000\nsubdirectories and about a 4 million files. For averaging and statistical analysis, I'm using\n[hyperfine](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Fhyperfine). The following benchmarks are performed\nwith a \"warm\"\u002Fpre-filled disk-cache (results for a \"cold\" disk-cache show the same trends).\n\nLet's start with `find`:\n```\nBenchmark 1: find ~ -iregex '.*[0-9]\\.jpg$'\n  Time (mean ± σ):     19.922 s ±  0.109 s\n  Range (min … max):   19.765 s … 20.065 s\n```\n\n`find` is much faster if it does not need to perform a regular-expression search:\n```\nBenchmark 2: find ~ -iname '*[0-9].jpg'\n  Time (mean ± σ):     11.226 s ±  0.104 s\n  Range (min … max):   11.119 s … 11.466 s\n```\n\nNow let's try the same for `fd`. Note that `fd` performs a regular expression\nsearch by default. The options `-u`\u002F`--unrestricted` option is needed here for\na fair comparison. Otherwise `fd` does not have to traverse hidden folders and\nignored paths (see below):\n```\nBenchmark 3: fd -u '[0-9]\\.jpg$' ~\n  Time (mean ± σ):     854.8 ms ±  10.0 ms\n  Range (min … max):   839.2 ms … 868.9 ms\n```\nFor this particular example, `fd` is approximately **23 times faster** than `find -iregex`\nand about **13 times faster** than `find -iname`. By the way, both tools found the exact\nsame 546 files :smile:.\n\n**Note**: This is *one particular* benchmark on *one particular* machine. While we have\nperformed a lot of different tests (and found consistent results), things might\nbe different for you! We encourage everyone to try it out on their own. See\n[this repository](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Ffd-benchmarks) for all necessary scripts.\n\nConcerning *fd*'s speed, a lot of credit goes to the `regex` and `ignore` crates that are\nalso used in [ripgrep](https:\u002F\u002Fgithub.com\u002FBurntSushi\u002Fripgrep) (check it out!).\n\n## Troubleshooting\n\n### `fd` does not find my file!\n\nRemember that `fd` ignores hidden directories and files by default. It also ignores patterns\nfrom `.gitignore` files. If you want to make sure to find absolutely every possible file, always\nuse the options `-u`\u002F`--unrestricted` option (or `-HI` to enable hidden and ignored files):\n``` bash\n> fd -u …\n```\n\nAlso remember that by default, `fd` only searches based on the filename and\ndoesn't compare the pattern to the full path. If you want to search based on the\nfull path (similar to the `-path` option of `find`) you need to use the `--full-path`\n(or `-p`) option.\n\n### Colorized output\n\n`fd` can colorize files by extension, just like `ls`. In order for this to work, the environment\nvariable [`LS_COLORS`](https:\u002F\u002Flinux.die.net\u002Fman\u002F5\u002Fdir_colors) has to be set. Typically, the value\nof this variable is set by the `dircolors` command which provides a convenient configuration format\nto define colors for different file formats.\nOn most distributions, `LS_COLORS` should be set already. If you are on Windows or if you are looking\nfor alternative, more complete (or more colorful) variants, see [here](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Fvivid),\n[here](https:\u002F\u002Fgithub.com\u002Fseebi\u002Fdircolors-solarized) or\n[here](https:\u002F\u002Fgithub.com\u002Ftrapd00r\u002FLS_COLORS).\n\n`fd` also honors the [`NO_COLOR`](https:\u002F\u002Fno-color.org\u002F) environment variable.\n\n### `fd` doesn't seem to interpret my regex pattern correctly\n\nA lot of special regex characters (like `[]`, `^`, `$`, ..) are also special characters in your\nshell. If in doubt, always make sure to put single quotes around the regex pattern:\n\n``` bash\n> fd '^[A-Z][0-9]+$'\n```\n\nIf your pattern starts with a dash, you have to add `--` to signal the end of command line\noptions. Otherwise, the pattern will be interpreted as a command-line option. Alternatively,\nuse a character class with a single hyphen character:\n\n``` bash\n> fd -- '-pattern'\n> fd '[-]pattern'\n```\n\n### \"Command not found\" for `alias`es or shell functions\n\nShell `alias`es and shell functions can not be used for command execution via `fd -x` or\n`fd -X`. In `zsh`, you can make the alias global via `alias -g myalias=\"…\"`. In `bash`,\nyou can use `export -f my_function` to make available to child processes. You would still\nneed to call `fd -x bash -c 'my_function \"$1\"' bash`. For other use cases or shells, use\na (temporary) shell script.\n\n### Placeholders in `-x`\u002F`-X`\n\nDepending on your shell, you may need to quote the placeholders (`{}`, `{\u002F}`, `{\u002F\u002F}`,\n`{.}`, `{\u002F.}`) to prevent the shell from interpreting them before `fd` sees them.\n\n## Integration with other programs\n\n### Using fd with `fzf`\n\nYou can use *fd* to generate input for the command-line fuzzy finder [fzf](https:\u002F\u002Fgithub.com\u002Fjunegunn\u002Ffzf):\n``` bash\nexport FZF_DEFAULT_COMMAND='fd --type file'\nexport FZF_CTRL_T_COMMAND=\"$FZF_DEFAULT_COMMAND\"\n```\n\nThen, you can type `vim \u003CCtrl-T>` on your terminal to open fzf and search through the fd-results.\n\nAlternatively, you might like to follow symbolic links and include hidden files (but exclude `.git` folders):\n``` bash\nexport FZF_DEFAULT_COMMAND='fd --type file --follow --hidden --exclude .git'\n```\n\nYou can even use fd's colored output inside fzf by setting:\n``` bash\nexport FZF_DEFAULT_COMMAND=\"fd --type file --color=always\"\nexport FZF_DEFAULT_OPTS=\"--ansi\"\n```\n\nFor more details, see the [Tips section](https:\u002F\u002Fgithub.com\u002Fjunegunn\u002Ffzf#tips) of the fzf README.\n\n### Using fd with `rofi`\n\n[*rofi*](https:\u002F\u002Fgithub.com\u002Fdavatorium\u002Frofi) is a graphical launch menu application that is able to create menus by reading from *stdin*. Piping `fd` output into `rofi`s `-dmenu` mode creates fuzzy-searchable lists of files and directories.\n\n#### Example\n\nCreate a case-insensitive searchable multi-select list of *PDF* files under your `$HOME` directory and open the selection with your configured PDF viewer. To list all file types, drop the `-e pdf` argument.\n\n``` bash\nfd --type f -e pdf . $HOME | rofi -keep-right -dmenu -i -p FILES -multi-select | xargs -I {} xdg-open {}\n```\n\nTo modify the list that is presented by rofi, add arguments to the `fd` command. To modify the search behaviour of rofi, add arguments to the `rofi` command.\n\n### Using fd with `emacs`\n\nThe emacs package [find-file-in-project](https:\u002F\u002Fgithub.com\u002Ftechnomancy\u002Ffind-file-in-project) can\nuse *fd* to find files.\n\nAfter installing `find-file-in-project`, add the line `(setq ffip-use-rust-fd t)` to your\n`~\u002F.emacs` or `~\u002F.emacs.d\u002Finit.el` file.\n\nIn emacs, run `M-x find-file-in-project-by-selected` to find matching files. Alternatively, run\n`M-x find-file-in-project` to list all available files in the project.\n\n### Printing the output as a tree\n\nTo format the output of `fd` as a file-tree you can use the `tree` command with\n`--fromfile`:\n```bash\n❯ fd | tree --fromfile\n```\n\nThis can be more useful than running `tree` by itself because `tree` does not\nignore any files by default, nor does it support as rich a set of options as\n`fd` does to control what to print:\n```bash\n❯ fd --extension rs | tree --fromfile\n.\n├── build.rs\n└── src\n    ├── app.rs\n    └── error.rs\n```\n\nOn bash and similar you can simply create an alias:\n```bash\n❯ alias as-tree='tree --fromfile'\n```\n\n### Using fd with `xargs` or `parallel`\n\nNote that `fd` has a builtin feature for [command execution](#command-execution) with\nits `-x`\u002F`--exec` and `-X`\u002F`--exec-batch` options. If you prefer, you can still use\nit in combination with `xargs`:\n``` bash\n> fd -0 -e rs | xargs -0 wc -l\n```\nHere, the `-0` option tells *fd* to separate search results by the NULL character (instead of\nnewlines). In the same way, the `-0` option of `xargs` tells it to read the input in this way.\n\n## Installation\n\n[![Packaging status](https:\u002F\u002Frepology.org\u002Fbadge\u002Fvertical-allrepos\u002Ffd-find.svg)](https:\u002F\u002Frepology.org\u002Fproject\u002Ffd-find\u002Fversions)\n\n### On Ubuntu\n*... and other Debian-based Linux distributions.*\n\nIf you run Ubuntu 19.04 (Disco Dingo) or newer, you can install the\n[officially maintained package](https:\u002F\u002Fpackages.ubuntu.com\u002Ffd-find):\n```\napt install fd-find\n```\nNote that the binary is called `fdfind` as the binary name `fd` is already used by another package.\nIt is recommended that after installation, you add a link to `fd` by executing command\n`ln -s $(which fdfind) ~\u002F.local\u002Fbin\u002Ffd`, in order to use `fd` in the same way as in this documentation.\nMake sure that `$HOME\u002F.local\u002Fbin` is in your `$PATH`.\n\nIf you use an older version of Ubuntu, you can download the latest `.deb` package from the\n[release page](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Ffd\u002Freleases) and install it via:\n``` bash\ndpkg -i fd_9.0.0_amd64.deb # adapt version number and architecture\n```\n\nNote that the .deb packages on the release page for this project still name the executable `fd`.\n\n### On Debian\n\nIf you run Debian Buster or newer, you can install the\n[officially maintained Debian package](https:\u002F\u002Ftracker.debian.org\u002Fpkg\u002Frust-fd-find):\n```\napt-get install fd-find\n```\nNote that the binary is called `fdfind` as the binary name `fd` is already used by another package.\nIt is recommended that after installation, you add a link to `fd` by executing command\n`ln -s $(which fdfind) ~\u002F.local\u002Fbin\u002Ffd`, in order to use `fd` in the same way as in this documentation.\nMake sure that `$HOME\u002F.local\u002Fbin` is in your `$PATH`.\n\nNote that the .deb packages on the release page for this project still name the executable `fd`.\n\n### On Fedora\n\nStarting with Fedora 28, you can install `fd` from the official package sources:\n``` bash\ndnf install fd-find\n```\n\n### On Alpine Linux\n\nYou can install [the fd package](https:\u002F\u002Fpkgs.alpinelinux.org\u002Fpackages?name=fd)\nfrom the official sources, provided you have the appropriate repository enabled:\n```\napk add fd\n```\n\n### On Arch Linux\n\nYou can install [the fd package](https:\u002F\u002Fwww.archlinux.org\u002Fpackages\u002Fextra\u002Fx86_64\u002Ffd\u002F) from the official repos:\n```\npacman -S fd\n```\nYou can also install fd [from the AUR](https:\u002F\u002Faur.archlinux.org\u002Fpackages\u002Ffd-git).\n\n### On Gentoo Linux\n\nYou can use [the fd ebuild](https:\u002F\u002Fpackages.gentoo.org\u002Fpackages\u002Fsys-apps\u002Ffd) from the official repo:\n```\nemerge -av fd\n```\n\n### On openSUSE Linux\n\nYou can install [the fd package](https:\u002F\u002Fsoftware.opensuse.org\u002Fpackage\u002Ffd) from the official repo:\n```\nzypper in fd\n```\n\n### On Void Linux\n\nYou can install `fd` via xbps-install:\n```\nxbps-install -S fd\n```\n\n### On ALT Linux\n\nYou can install [the fd package](https:\u002F\u002Fpackages.altlinux.org\u002Fen\u002Fsisyphus\u002Fsrpms\u002Ffd\u002F) from the official repo:\n```\napt-get install fd\n```\n\n### On Solus\n\nYou can install [the fd package](https:\u002F\u002Fgithub.com\u002Fgetsolus\u002Fpackages\u002Ftree\u002Fmain\u002Fpackages\u002Ff\u002Ffd) from the official repo:\n```\neopkg install fd\n```\n\n### On RedHat Enterprise Linux (RHEL) 8\u002F9\u002F10, Almalinux 8\u002F9\u002F10, EuroLinux 8\u002F9 or Rocky Linux 8\u002F9\u002F10\n\nYou can install [the `fd` package](https:\u002F\u002Fcopr.fedorainfracloud.org\u002Fcoprs\u002Ftkbcopr\u002Ffd\u002F) from Fedora Copr.\n\n```bash\ndnf copr enable tkbcopr\u002Ffd\ndnf install fd\n```\n\nA different version using the [slower](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Ffd\u002Fpull\u002F481#issuecomment-534494592) malloc [instead of jemalloc](https:\u002F\u002Fbugzilla.redhat.com\u002Fshow_bug.cgi?id=2216193#c1) is also available from the EPEL8\u002F9 repo as the package `fd-find`.\n\n### On macOS\n\nYou can install `fd` with [Homebrew](https:\u002F\u002Fformulae.brew.sh\u002Fformula\u002Ffd):\n```\nbrew install fd\n```\n\n… or with MacPorts:\n```\nport install fd\n```\n\n### On Windows\n\nYou can download pre-built binaries from the [release page](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Ffd\u002Freleases).\n\nAlternatively, you can install `fd` via [Scoop](http:\u002F\u002Fscoop.sh):\n```\nscoop install fd\n```\n\nOr via [Chocolatey](https:\u002F\u002Fchocolatey.org):\n```\nchoco install fd\n```\n\nOr via [Winget](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fwindows\u002Fpackage-manager\u002F):\n```\nwinget install sharkdp.fd\n```\n\n### On GuixOS\n\nYou can install [the fd package](https:\u002F\u002Fguix.gnu.org\u002Fen\u002Fpackages\u002Ffd-8.1.1\u002F) from the official repo:\n```\nguix install fd\n```\n\n### On Mise\n\nYou can use [mise](https:\u002F\u002Fgithub.com\u002Fjdx\u002Fmise) to install `fd` with a command like this:\n```\nmise use -g fd@latest\n```\n\n### On NixOS \u002F via Nix\n\nYou can use the [Nix package manager](https:\u002F\u002Fnixos.org\u002Fnix\u002F) to install `fd`:\n```\nnix-env -i fd\n```\n\n### Via Flox\n\nYou can use [Flox](https:\u002F\u002Fflox.dev) to install `fd` into a Flox environment:\n```\nflox install fd\n```\n\n### On FreeBSD\n\nYou can install [the fd-find package](https:\u002F\u002Fwww.freshports.org\u002Fsysutils\u002Ffd) from the official repo:\n```\npkg install fd-find\n```\n\n### From npm\n\nOn Linux and macOS, you can install the [fd-find](https:\u002F\u002Fnpm.im\u002Ffd-find) package:\n\n```\nnpm install -g fd-find\n```\n\n### From source\n\nWith Rust's package manager [cargo](https:\u002F\u002Fgithub.com\u002Frust-lang\u002Fcargo), you can install *fd* via:\n```\ncargo install fd-find\n```\nNote that rust version *1.77.2* or later is required.\n\n`make` is also needed for the build.\n\n### From binaries\n\nThe [release page](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Ffd\u002Freleases) includes precompiled binaries for Linux, macOS and Windows. Statically-linked binaries are also available: look for archives with `musl` in the file name.\n\n## Development\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Ffd\n\n# Build\ncd fd\ncargo build\n\n# Run unit tests and integration tests\ncargo test\n\n# Install\ncargo install --path .\n```\n\n### Completions\n\n#### From Release Archives\n\nPre-built completion files are included in the release archives (`.tar.gz`\u002F`.zip`) on the\n[Releases page](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Ffd\u002Freleases), in the `autocomplete` directory.\nTo use these completions:\n\n- **bash**: Source the `fd.bash` file in your `~\u002F.bashrc`, or place it in a directory that gets sourced automatically.\n- **zsh**: Move `_fd` to a directory in your `fpath` (e.g., `~\u002F.zfunc`).\n- **fish**: Copy `fd.fish` to `~\u002F.config\u002Ffish\u002Fcompletions\u002F`.\n- **powershell**: Source `_fd.ps1` from one of your [profile scripts](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpowershell\u002Fscripting\u002Flearn\u002Fshell\u002Fcreating-profiles?view=powershell-7.5).\n\n#### Generate from fd\n\nYou can also generate completions directly using `fd --gen-completions \u003Cshell>`:\n\n```bash\n# Bash\nfd --gen-completions bash > ~\u002F.local\u002Fshare\u002Fbash-completion\u002Fcompletions\u002Ffd\n\n# Zsh (ensure ~\u002F.zfunc is in your fpath)\nfd --gen-completions zsh > ~\u002F.zfunc\u002F_fd\n\n# Fish\nfd --gen-completions fish > ~\u002F.config\u002Ffish\u002Fcompletions\u002Ffd.fish\n\n# PowerShell\nfd --gen-completions powershell >> $PROFILE\n```\n\n## Maintainers\n\n- [sharkdp](https:\u002F\u002Fgithub.com\u002Fsharkdp)\n- [tmccombs](https:\u002F\u002Fgithub.com\u002Ftmccombs)\n- [tavianator](https:\u002F\u002Fgithub.com\u002Ftavianator)\n\n## License\n\n`fd` is distributed under the terms of both the MIT License and the Apache License 2.0.\n\nSee the [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) files for license details.\n","fd 是一个用于在文件系统中查找条目的程序，旨在成为 `find` 命令的一个简单、快速且用户友好的替代品。它使用直观的语法和正则表达式或通配符模式进行搜索，默认情况下支持智能大小写匹配，并自动忽略隐藏文件和 `.gitignore` 中指定的模式。通过并行化目录遍历，fd 实现了极高的搜索速度，并使用颜色区分不同类型的文件。此外，它还支持并行命令执行。fd 适用于需要高效、便捷地在文件系统中查找文件或目录的各种场景，如开发环境中的代码搜索、系统管理等。",2,"2026-06-11 02:41:29","top_all"]