{"id":17502621,"url":"https://github.com/dkorunic/minifind","last_synced_at":"2025-04-23T04:28:11.013Z","repository":{"id":258189676,"uuid":"872556324","full_name":"dkorunic/minifind","owner":"dkorunic","description":"minimal find reimplementation with the emphasis on speed","archived":false,"fork":false,"pushed_at":"2025-03-12T07:43:05.000Z","size":47,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-17T19:18:13.525Z","etag":null,"topics":["command-line-tool","filesystem","find","linux","macos","os","performance","performance-analysis","system-administration","unix","utility"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dkorunic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-10-14T16:35:02.000Z","updated_at":"2025-03-16T00:42:08.000Z","dependencies_parsed_at":"2024-11-04T18:29:19.949Z","dependency_job_id":"48e64eeb-97cd-4249-9729-74c213e731bd","html_url":"https://github.com/dkorunic/minifind","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"f6c30ab40291ade391210eb5a5d3f1340034abb5"},"previous_names":["dkorunic/minifind"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkorunic%2Fminifind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkorunic%2Fminifind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkorunic%2Fminifind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkorunic%2Fminifind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dkorunic","download_url":"https://codeload.github.com/dkorunic/minifind/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250369870,"owners_count":21419285,"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":["command-line-tool","filesystem","find","linux","macos","os","performance","performance-analysis","system-administration","unix","utility"],"created_at":"2024-10-19T21:14:37.748Z","updated_at":"2025-04-23T04:28:10.995Z","avatar_url":"https://github.com/dkorunic.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minifind\n\n[![GitHub license](https://img.shields.io/github/license/dkorunic/minifind.svg)](https://github.com/dkorunic/minifind/blob/master/LICENSE.txt)\n[![GitHub release](https://img.shields.io/github/release/dkorunic/minifind.svg)](https://github.com/dkorunic/minifind/releases/latest)\n[![Rust Report Card](https://rust-reportcard.xuri.me/badge/github.com/dkorunic/minifind)](https://rust-reportcard.xuri.me/report/github.com/dkorunic/minifind)\n[![release](https://github.com/dkorunic/minifind/actions/workflows/release.yml/badge.svg)](https://github.com/dkorunic/minifind/actions/workflows/release.yml)\n\n## About\n\n`minifind` is a barebones Un\\*x `find` tool implementation in Rust, meant just to list directory entries as fast as possible and little else. For filename or path matching, it is possible to use `--name` or `--regex` options, toggling case insensitivity with `--case-insensitive` or not. Additionally to narrow down matches, it is possible to use `--file-type` option and filter by file type (`b` for block device, `c` for character device, `d` for directory, `p` for named FIFO, `f` for file, `l` for symlink, `s` for socket or `e` for empty file/directory).\n\nIt will not follow filesystem symlinks and it will not cross filesystem boundaries by default. Number of threads used is set to the number of available CPU cores in the system.\n\n## Related projects\n\nLet us also mention other notable projects dealing with this task:\n\n- [sharkdp/fd](https://github.com/sharkdp/fd) which is a much more featured find alternative but with excellent performance,\n- [LyonSyonII/hunt-rs](https://github.com/LyonSyonII/hunt-rs), a very similar high performance-oriented tool,\n- [BurntSushi/ripgrep](https://github.com/BurntSushi/ripgrep) which also houses [globset](https://github.com/BurntSushi/ripgrep/tree/master/crates/globset) and [ignore](https://github.com/BurntSushi/ripgrep/tree/master/crates/ignore) crates that are used in this project,\n- Rust [findutils](https://github.com/uutils/findutils) reimplementation that can be used as drop-in replacement.\n\n## Usage\n\n```shell\nUsage: minifind [OPTIONS] \u003cPATH\u003e...\n\nArguments:\n  \u003cPATH\u003e...  Paths to check for large directories\n\nOptions:\n  -f, --follow-symlinks \u003cFOLLOW_SYMLINKS\u003e    Follow symlinks [default: false] [short aliases: L] [possible values: true, false]\n  -o, --one-filesystem \u003cONE_FILESYSTEM\u003e      Do not cross mount points [default: true] [aliases: xdev] [possible values: true, false]\n  -x, --threads \u003cTHREADS\u003e                    Number of threads to use when calibrating and scanning [default: 20]\n  -d, --max-depth \u003cMAX_DEPTH\u003e                Maximum depth to traverse\n  -n, --name \u003cNAME\u003e                          Base of the file name matching globbing pattern\n  -r, --regex \u003cREGEX\u003e                        File name (full path) matching regular expression pattern\n  -i, --case-insensitive \u003cCASE_INSENSITIVE\u003e  Case-insensitive matching for globbing and regular expression patterns [default: false] [possible values: true, false]\n  -t, --file-type \u003cFILE_TYPE\u003e                Filter matches by type. Also accepts 'b', 'c', 'd', 'p', 'f', 'l', 's' and 'e' aliases [default: directory file symlink]\n                                             [possible values: empty, block-device, char-device, directory, pipe, file, symlink, socket]\n  -h, --help                                 Print help\n  -V, --version                              Print version\n```\n\n### Regular expressions\n\n`--regex` option uses Rust [regex syntax](https://docs.rs/regex/latest/regex/#syntax) that is very similar to other engines but without support for look-around and backreferences.\n\n### Glob expressions\n\n`--name` option uses Unix-style [glob syntax](https://docs.rs/globset/latest/globset/#syntax).\n\n## Minifind vs GNU find\n\nHardware: 8-core Xeon E5-1630 with 4-drive SATA RAID-10\n\nBenchmark setup:\n\n```shell\n$ cat bench1.sh\n#!/bin/dash\nexec /usr/bin/find / -xdev\n\n$ cat bench2.sh\n#!/bin/dash\nexec /usr/local/sbin/minifind /\n```\n\n```shell\nBenchmark 1: ./bench1.sh\n  Time (mean ± σ):      4.655 s ±  0.160 s    [User: 1.287 s, System: 3.366 s]\n  Range (min … max):    4.525 s …  5.016 s    10 runs\n\nBenchmark 2: ./bench2.sh\n  Time (mean ± σ):      1.244 s ±  0.020 s    [User: 3.921 s, System: 5.908 s]\n  Range (min … max):    1.199 s …  1.271 s    10 runs\n\nSummary\n  ./bench2.sh ran\n    3.74 ± 0.14 times faster than ./bench1.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkorunic%2Fminifind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkorunic%2Fminifind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkorunic%2Fminifind/lists"}