{"id":13393915,"url":"https://github.com/sharkdp/fd","last_synced_at":"2025-05-12T16:05:17.818Z","repository":{"id":37390649,"uuid":"90793418","full_name":"sharkdp/fd","owner":"sharkdp","description":"A simple, fast and user-friendly alternative to 'find'","archived":false,"fork":false,"pushed_at":"2025-05-01T17:49:53.000Z","size":2071,"stargazers_count":37793,"open_issues_count":130,"forks_count":873,"subscribers_count":149,"default_branch":"master","last_synced_at":"2025-05-05T14:07:46.295Z","etag":null,"topics":["cli","command-line","filesystem","hacktoberfest","regex","rust","search","terminal","tool"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sharkdp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"sharkdp"}},"created_at":"2017-05-09T21:27:10.000Z","updated_at":"2025-05-05T14:00:05.000Z","dependencies_parsed_at":"2023-02-19T17:30:38.321Z","dependency_job_id":"0911b401-0ca1-4f28-9209-7dbe0126eb52","html_url":"https://github.com/sharkdp/fd","commit_stats":{"total_commits":1293,"total_committers":200,"mean_commits":6.465,"dds":0.7223511214230471,"last_synced_commit":"be815c261ace9cd0026cff5c8a579cda094e10fd"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Ffd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Ffd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Ffd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Ffd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharkdp","download_url":"https://codeload.github.com/sharkdp/fd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253773747,"owners_count":21962191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line","filesystem","hacktoberfest","regex","rust","search","terminal","tool"],"created_at":"2024-07-30T17:01:02.486Z","updated_at":"2025-05-12T16:05:17.782Z","avatar_url":"https://github.com/sharkdp.png","language":"Rust","readme":"# fd\n\n[![CICD](https://github.com/sharkdp/fd/actions/workflows/CICD.yml/badge.svg)](https://github.com/sharkdp/fd/actions/workflows/CICD.yml)\n[![Version info](https://img.shields.io/crates/v/fd-find.svg)](https://crates.io/crates/fd-find)\n[[中文](https://github.com/cha0ran/fd-zh)]\n[[한국어](https://github.com/spearkkk/fd-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://www.gnu.org/software/findutils/).\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://vimdoc.sourceforge.net/htmldoc/options.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://github.com/ggreer/the_silver_searcher) than\n  `find` :-).\n\n## Demo\n\n![Demo](doc/screencast.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\u003e fd netfl\nSoftware/python/imdb-ratings/netflix-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\u003e cd /etc\n\u003e fd '^x.*rc$'\nX11/xinit/xinitrc\nX11/xinit/xserverrc\n```\n\nThe regular expression syntax used by `fd` is [documented here](https://docs.rs/regex/latest/regex/#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\u003e fd passwd /etc\n/etc/default/passwd\n/etc/pam.d/passwd\n/etc/passwd\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\u003e cd fd/tests\n\u003e fd\ntestenv\ntestenv/mod.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\u003e fd . fd/tests/\ntestenv\ntestenv/mod.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\u003e cd fd\n\u003e fd -e md\nCONTRIBUTING.md\nREADME.md\n```\n\nThe `-e` option can be used in combination with a search pattern:\n``` bash\n\u003e fd -e rs mod\nsrc/fshelper/mod.rs\nsrc/lscolors/mod.rs\ntests/testenv/mod.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\u003e fd -g libc.so /usr\n/usr/lib32/libc.so\n/usr/lib/libc.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\u003e fd pre-commit\n\u003e fd -H pre-commit\n.git/hooks/pre-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\u003e fd num_cpu\n\u003e fd -I num_cpu\ntarget/debug/deps/libnum_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`/`--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\u003e fd -p -g '**/.git/config'\n\u003e fd -p '.*/lesson-\\d+/[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`/`--exec` option runs an external command *for each of the search results* (in parallel).\n* The `-X`/`--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/file2.zip`, this would execute\n`unzip file1.zip` and `unzip backup/file2.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\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/test_advanced.py`, this will run `vim test_basic.py lib/test_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`/`--list-details`\noption to execute `ls` in this way: `fd … -l`.\n\nThe `-X` option is also useful when combining `fd` with [ripgrep](https://github.com/BurntSushi/ripgrep/) (`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 \u003e 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\nThe syntax for generating commands is similar to that of [GNU Parallel](https://www.gnu.org/software/parallel/):\n\n- `{}`: A placeholder token that will be replaced with the path of the search result\n  (`documents/images/party.jpg`).\n- `{.}`: Like `{}`, but without the file extension (`documents/images/party`).\n- `{/}`: A placeholder that will be replaced by the basename of the search result (`party.jpg`).\n- `{//}`: The parent of the discovered path (`documents/images`).\n- `{/.}`: 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`/`--exec`, you can control the number of parallel jobs by using the `-j`/`--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\u003e fd -H -E .git …\n```\n\nWe can also use this to skip mounted directories:\n``` bash\n\u003e fd -E /mnt/external-drive …\n```\n\n.. or to skip certain file types:\n``` bash\n\u003e 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\u003e cat ~/.fdignore\n/mnt/external-drive\n*.bak\n```\n\n\u003e [!NOTE]\n\u003e `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 `~/.config/fd/ignore` in macOS or Linux, and `%APPDATA%\\fd\\ignore` in\nWindows.\n\nYou may wish to include `.git/` in your `fd/ignore` 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`/`-X` option to call `rm`. For\nexample, to recursively remove all `.DS_Store` files, run:\n``` bash\n\u003e 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\u003e 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`/`-r` flag to remove directories.\n\n\u003e [!NOTE]\n\u003e There are scenarios where using `fd … -X rm -r` can cause race conditions: if you have a\npath like `…/foo/bar/foo/…` 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/bar/foo':\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\u003e          Set maximum search depth (default: none)\n  -E, --exclude \u003cpattern\u003e          Exclude entries that match the given glob pattern\n  -t, --type \u003cfiletype\u003e            Filter by type: file (f), directory (d/dir), symlink (l),\n                                   executable (x), empty (e), socket (s), pipe (p), char-device\n                                   (c), block-device (b)\n  -e, --extension \u003cext\u003e            Filter by file extension\n  -S, --size \u003csize\u003e                Limit results based on the size of files\n      --changed-within \u003cdate|dur\u003e  Filter by file modification time (newer than)\n      --changed-before \u003cdate|dur\u003e  Filter by file modification time (older than)\n  -o, --owner \u003cuser:group\u003e         Filter by owning user and/or group\n      --format \u003cfmt\u003e               Print results according to template\n  -x, --exec \u003ccmd\u003e...              Execute a command for each search result\n  -X, --exec-batch \u003ccmd\u003e...        Execute a command with all search results at once\n  -c, --color \u003cwhen\u003e               When to use colors [default: auto] [possible values: auto,\n                                   always, never]\n      --hyperlink[=\u003cwhen\u003e]         Add hyperlinks to output paths [default: never] [possible\n                                   values: auto, always, never]\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/or 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://github.com/sharkdp/hyperfine). The following benchmarks are performed\nwith a \"warm\"/pre-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`/`--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://github.com/sharkdp/fd-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://github.com/BurntSushi/ripgrep) (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`/`--unrestricted` option (or `-HI` to enable hidden and ignored files):\n``` bash\n\u003e 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://linux.die.net/man/5/dir_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://github.com/sharkdp/vivid),\n[here](https://github.com/seebi/dircolors-solarized) or\n[here](https://github.com/trapd00r/LS_COLORS).\n\n`fd` also honors the [`NO_COLOR`](https://no-color.org/) 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\u003e 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\u003e fd -- '-pattern'\n\u003e 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## 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://github.com/junegunn/fzf):\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\u003e` 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://github.com/junegunn/fzf#tips) of the fzf README.\n\n### Using fd with `rofi`\n\n[*rofi*](https://github.com/davatorium/rofi) 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://github.com/technomancy/find-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`~/.emacs` or `~/.emacs.d/init.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`/`--exec` and `-X`/`--exec-batch` options. If you prefer, you can still use\nit in combination with `xargs`:\n``` bash\n\u003e 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://repology.org/badge/vertical-allrepos/fd-find.svg)](https://repology.org/project/fd-find/versions)\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://packages.ubuntu.com/fd-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) ~/.local/bin/fd`, in order to use `fd` in the same way as in this documentation.\nMake sure that `$HOME/.local/bin` 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://github.com/sharkdp/fd/releases) 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://tracker.debian.org/pkg/rust-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) ~/.local/bin/fd`, in order to use `fd` in the same way as in this documentation.\nMake sure that `$HOME/.local/bin` 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://pkgs.alpinelinux.org/packages?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://www.archlinux.org/packages/extra/x86_64/fd/) from the official repos:\n```\npacman -S fd\n```\nYou can also install fd [from the AUR](https://aur.archlinux.org/packages/fd-git).\n\n### On Gentoo Linux\n\nYou can use [the fd ebuild](https://packages.gentoo.org/packages/sys-apps/fd) from the official repo:\n```\nemerge -av fd\n```\n\n### On openSUSE Linux\n\nYou can install [the fd package](https://software.opensuse.org/package/fd) 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://packages.altlinux.org/en/sisyphus/srpms/fd/) from the official repo:\n```\napt-get install fd\n```\n\n### On Solus\n\nYou can install [the fd package](https://github.com/getsolus/packages/tree/main/packages/f/fd) from the official repo:\n```\neopkg install fd\n```\n\n### On RedHat Enterprise Linux 8/9 (RHEL8/9), Almalinux 8/9, EuroLinux 8/9 or Rocky Linux 8/9\n\nYou can install [the `fd` package](https://copr.fedorainfracloud.org/coprs/tkbcopr/fd/) from Fedora Copr.\n\n```bash\ndnf copr enable tkbcopr/fd\ndnf install fd\n```\n\nA different version using the [slower](https://github.com/sharkdp/fd/pull/481#issuecomment-534494592) malloc [instead of jemalloc](https://bugzilla.redhat.com/show_bug.cgi?id=2216193#c1) is also available from the EPEL8/9 repo as the package `fd-find`.\n\n### On macOS\n\nYou can install `fd` with [Homebrew](https://formulae.brew.sh/formula/fd):\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://github.com/sharkdp/fd/releases).\n\nAlternatively, you can install `fd` via [Scoop](http://scoop.sh):\n```\nscoop install fd\n```\n\nOr via [Chocolatey](https://chocolatey.org):\n```\nchoco install fd\n```\n\nOr via [Winget](https://learn.microsoft.com/en-us/windows/package-manager/):\n```\nwinget install sharkdp.fd\n```\n\n### On GuixOS\n\nYou can install [the fd package](https://guix.gnu.org/en/packages/fd-8.1.1/) from the official repo:\n```\nguix install fd\n```\n\n### On NixOS / via Nix\n\nYou can use the [Nix package manager](https://nixos.org/nix/) to install `fd`:\n```\nnix-env -i fd\n```\n\n### Via Flox\n\nYou can use [Flox](https://flox.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://www.freshports.org/sysutils/fd) 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://npm.im/fd-find) package:\n\n```\nnpm install -g fd-find\n```\n\n### From source\n\nWith Rust's package manager [cargo](https://github.com/rust-lang/cargo), 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://github.com/sharkdp/fd/releases) 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://github.com/sharkdp/fd\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## Maintainers\n\n- [sharkdp](https://github.com/sharkdp)\n- [tmccombs](https://github.com/tmccombs)\n- [tavianator](https://github.com/tavianator)\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","funding_links":["https://github.com/sponsors/sharkdp"],"categories":["Install Vundle","Linux Tools","Command-Line Productivity","Rust","Find Replacement","应用","Applications","Files and Directories","Uncategorized","Tools/Scripts/Code:","Productivity Tools","开源工具","Install from Source","Command Line Utilities","应用程序 Applications","Project","find","\u003ca name=\"core\"\u003e\u003c/a\u003ecore","Command Line Tools","Tech","Other","Linux System Tools","⚡ Productivity","应用 Applications","File Processing","Command Line","其他","\\*nix/\\*nux","Tools","Linux","Miscellaneous Tools","语言资源库","Command line","Mac 软件","tools","Programming Languages","cli","Search","Lovely Commands","🐧 Linux","Linux生态圈Dev\u0026Ops工具与服务","CLI Utilities","Repository app","\u003ca name=\"find\"\u003e\u003c/a\u003eFile finding (alternatives to find)","Productivity tools","hacktoberfest","Command-line","System \u0026 Command","Languages and frameworks","Command line - Linux","工具","Resources","Table of Contents","Useful Command Line Tools","Table of contents"],"sub_categories":["Caveats","Open USP Tsukubai","System tools","Search","Uncategorized","命令行工具","Tools","系统工具 System tools","Application","[exa](https://the.exa.website/) (Rust, MIT)","File \u0026 Directory Tools","系统工具","Useful Linux Tools","Dependency Management","网络服务_其他","Searching","Rust","Terminal utils","rust","命令行","shell","Chess :chess_pawn:","Other","Shell","Learning resources","多模态","Command-Line Tools","CLI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharkdp%2Ffd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharkdp%2Ffd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharkdp%2Ffd/lists"}