{"id":13437345,"url":"https://github.com/vishaltelangre/ff","last_synced_at":"2025-04-04T18:08:30.128Z","repository":{"id":41947682,"uuid":"172123059","full_name":"vishaltelangre/ff","owner":"vishaltelangre","description":"Find files (ff) by name, fast!","archived":false,"fork":false,"pushed_at":"2022-01-27T19:02:50.000Z","size":97,"stargazers_count":332,"open_issues_count":1,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-25T06:32:25.796Z","etag":null,"topics":["cli","command-line","command-line-tool","ff","file-search","find","find-files","mdfind","rust","search"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vishaltelangre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-22T19:26:41.000Z","updated_at":"2024-10-21T01:33:17.000Z","dependencies_parsed_at":"2022-08-01T00:38:02.414Z","dependency_job_id":null,"html_url":"https://github.com/vishaltelangre/ff","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishaltelangre%2Fff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishaltelangre%2Fff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishaltelangre%2Fff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishaltelangre%2Fff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vishaltelangre","download_url":"https://codeload.github.com/vishaltelangre/ff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226215,"owners_count":20904465,"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","command-line-tool","ff","file-search","find","find-files","mdfind","rust","search"],"created_at":"2024-07-31T03:00:56.139Z","updated_at":"2025-04-04T18:08:30.100Z","avatar_url":"https://github.com/vishaltelangre.png","language":"Rust","funding_links":[],"categories":["Applications","Rust","应用程序 Applications","应用","应用 Applications","cli"],"sub_categories":["Text processing","文本处理 Text processing","文本处理"],"readme":"# Find Files (ff)\n\n[![Build Status](https://travis-ci.org/vishaltelangre/ff.svg?branch=master)](https://travis-ci.org/vishaltelangre/ff)\n[![Version info](https://img.shields.io/crates/v/find-files.svg)](https://crates.io/crates/find-files)\n\nFind Files (ff) utility recursively searches the files whose names match the\nspecified RegExp pattern in the provided directory (defaults to the current\ndirectory if not provided).\n\nDual-licensed under [MIT](LICENSE-MIT) or the [UNLICENSE](UNLICENSE).\n\n## Screenshot\n\n![Screenshot](screenshot.png)\n\n## Installation\n\nThere are various ways to install `ff` on your system.\n\n### Install using Homebrew\n\nIf you use macOS, install `ff` simply using `brew install vishaltelangre/tap/ff`.\n\n### Download precompiled executables for your platform/OS\n\nDownload the latest precompiled executable `ff` binary for your platform from the [releases](https://github.com/vishaltelangre/ff/releases) page.\n\n### Install using Cargo\n\nIf you're a Rust programmer, download and install `ff` command using `cargo install find-files`. To update to a newer version, use the `--force` flag.\n\n# Benchmark Results\n\n```\n$ hyperfine                                \\\n    --warmup 3                             \\\n    --export-markdown benchmark-results.md \\\n    \"find . -iregex '.*[0-9]\\.jpg$'\"       \\\n    \"find . -iname '*[0-9].jpg'\"           \\\n    \"fd -HI '.*[0-9]\\.jpg$'\"               \\\n    \"ff .*[0-9]\\.jpg$\"\n\nBenchmark #1: find . -iregex '.*[0-9]\\.jpg$'\n  Time (mean ± σ):      42.8 ms ±   5.5 ms    [User: 11.7 ms, System: 30.1 ms]\n  Range (min … max):    31.2 ms …  56.9 ms    48 runs\n\nBenchmark #2: find . -iname '*[0-9].jpg'\n  Time (mean ± σ):      60.8 ms ±   7.2 ms    [User: 27.9 ms, System: 31.4 ms]\n  Range (min … max):    44.0 ms …  76.2 ms    37 runs\n\nBenchmark #3: fd -HI '.*[0-9]\\.jpg$'\n  Time (mean ± σ):      18.8 ms ±   5.3 ms    [User: 14.9 ms, System: 19.9 ms]\n  Range (min … max):    11.2 ms …  41.6 ms    96 runs\n\nBenchmark #4: ff .*[0-9]\\.jpg$\n  Time (mean ± σ):      18.7 ms ±   4.6 ms    [User: 15.7 ms, System: 22.5 ms]\n  Range (min … max):    11.7 ms …  30.4 ms    123 runs\n\nSummary\n  'ff .*[0-9]\\.jpg$' ran\n    1.00 ± 0.37 times faster than 'fd -HI '.*[0-9]\\.jpg$''\n    2.29 ± 0.63 times faster than 'find . -iregex '.*[0-9]\\.jpg$''\n    3.25 ± 0.88 times faster than 'find . -iname '*[0-9].jpg'\n```\n\n| Command                          |  Mean [ms] | Min…Max [ms] |\n| :------------------------------- | ---------: | -----------: |\n| `find . -iregex '.*[0-9]\\.jpg$'` | 42.8 ± 5.5 |    31.2…56.9 |\n| `find . -iname '*[0-9].jpg'`     | 60.8 ± 7.2 |    44.0…76.2 |\n| `fd -HI '.*[0-9]\\.jpg$'`         | 18.8 ± 5.3 |    11.2…41.6 |\n| `ff .*[0-9]\\.jpg$`               | 18.7 ± 4.6 |    11.7…30.4 |\n\nTable: *benchmark-results.md*\n\n**NOTE:** Sometimes, `fd` is a bit faster than `ff` by approximately `1 ms` to `2 ms`.\n\n## Usage\n\n```\nUSAGE:\n    ff [FLAGS] [OPTIONS] \u003cPATTERN\u003e [ROOT_PATH]\n\nFLAGS:\n    -s, --case-sensitive       Search case sensitively. By default, files are\n                               searched case insensitively.\n    -D, --exclude-dir-paths    Exclude paths from the search result which are\n                               directories and not files.\n    -h, --help                 Prints help information\n    -G, --ignore-gitignore     Ignore searching files and directories specified\n                               in .gitignore. By default, the files and\n                               directories specified in .gitignore are included\n                               in the search results.\n    -H, --ignore-hidden        Ignore searching hidden files and directories. By\n                               default, hidden files and directories are\n                               included in the search results.\n    -V, --version              Prints version information\n\nOPTIONS:\n    -x, --exclude \u003cexclude\u003e    Exclude files and directories matching this\n                               regular expression from the search results.\n    -L, --level \u003clevel\u003e        Recursively search only given level directories\n                               deep. By default no depth restriction is imposed.\n                               A value of 0 would always yield zero results. A\n                               value of 1 searches for the direct children in\n                               the given path.\n    -j, --threads \u003cthreads\u003e    The approximate number of threads to use. A value\n                               of 0 (which is the default) results in thread\n                               count set to available CPU cores.\n\nARGS:\n    \u003cPATTERN\u003e      Find files whose name (path) matches this substring or\n                   the regular expression.\n    \u003cROOT_PATH\u003e    Path to the directory to search files inside.[default:\n                   `$PWD`]\n```\n## Examples\n\nThere are a tons of possibilities to search files using `ff`.\nFollowing examples demonstrate just a tip of an iceberg.\n\n- List paths of files recursively in the current working directory matching `article` string.\n\n    ```\n    ff article\n    ```\n\n- List files having `.png`, or `.PNG` extension.\n\n    ```\n    ff png$\n    ```\n\n- List files having strict `.PNG` extension.\n\n    ```\n    ff -s PNG$\n    ```\n\n- Search various image files.\n\n    ```\n    ff \"\\.(png|jpg|jpeg|gif|svg)$\"\n    ```\n\n- List files whose path matches `controllers` string.\n\n    ```\n    ff controllers\n    ```\n\n- Search `.js` files in `./spec` directory.\n\n    ```\n    ff \\.js ./spec\n    ```\n\n- Search a file which is expected to be inside hidden `.git` directory whose name contains `commit` or something similar.\n\n    ```bash\n    $ ff git.*commit\n\n    ./.git/COMMIT_EDITMSG\n    # omitted other results\n    ```\n\n- Do not show hidden files and directories in the search results.\n\n    ```\n    ff something -H\n    ```\n\n- Do not show those files and directories in the search results which are enlisted in `.gitignore`.\n\n    ```\n    ff src/.*js$ -G\n    ```\n\n    Without `-G (--ignore-gitignore)` flag in the above command, it also includes the results in the directories such as `node_modules` by default.\n\n- Do not show paths which are just directories and not actual files.\n\n    ```bash\n    $ ff -D user\n\n    ./app/models/user.rb\n    ./app/models/user/address.rb\n    ./specs/models/user_spec.rb\n    ./specs/models/user/address_spec.rb\n    ```\n\n    Without `-D (--exclude-dir-paths)` flag in the above command, it also includes the paths of the matching directories in the results as follows.\n\n    ```bash\n    $ ff user\n\n    ./app/models/user.rb\n    ./app/models/user\n    ./app/models/user/address.rb\n    ./specs/models/user_spec.rb\n    ./specs/models/user\n    ./specs/models/user/address_spec.rb\n    ```\n\n- Exclude (omit) files and directories which match the provided optional exclude RegExp pattern.\n\n    ```\n    ff rb$ app/controllers -x /(audit|admin|sso|api)/\n    ```\n\n    Above command will show paths of all files whose name ends with `rb` inside the relative `app/controllers` directory excluding the paths which match `/(audit|admin|sso|api)/` pattern.\n\n- Limit searching beyond 3 levels deep in the given path.\n\n    ```\n    ff -L 3 .js$\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvishaltelangre%2Fff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvishaltelangre%2Fff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvishaltelangre%2Fff/lists"}