{"id":17931411,"url":"https://github.com/the8472/ffcnt","last_synced_at":"2025-10-29T06:21:55.337Z","repository":{"id":54440223,"uuid":"80243498","full_name":"the8472/ffcnt","owner":"the8472","description":"Fast file counting on HDDs","archived":false,"fork":false,"pushed_at":"2021-03-18T22:46:16.000Z","size":34,"stargazers_count":30,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-17T19:37:51.618Z","etag":null,"topics":["cli","filesystem","hdd","linux"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/the8472.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-27T20:30:27.000Z","updated_at":"2025-10-16T06:59:52.000Z","dependencies_parsed_at":"2022-08-13T15:40:59.860Z","dependency_job_id":null,"html_url":"https://github.com/the8472/ffcnt","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/the8472/ffcnt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the8472%2Fffcnt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the8472%2Fffcnt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the8472%2Fffcnt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the8472%2Fffcnt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the8472","download_url":"https://codeload.github.com/the8472/ffcnt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the8472%2Fffcnt/sbom","scorecard":{"id":877408,"data":{"date":"2025-08-11","repo":{"name":"github.com/the8472/ffcnt","commit":"33a4ae003a4bfc18d954e54f344022f98060b5b2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 1/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENCE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENCE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 0.2.2 not signed: https://api.github.com/repos/the8472/ffcnt/releases/6766073","Warn: release artifact 0.2.0 not signed: https://api.github.com/repos/the8472/ffcnt/releases/6345599","Warn: release artifact 0.1.3 not signed: https://api.github.com/repos/the8472/ffcnt/releases/5990385","Warn: release artifact 0.1.2 not signed: https://api.github.com/repos/the8472/ffcnt/releases/5645706","Warn: release artifact 0.1.1 not signed: https://api.github.com/repos/the8472/ffcnt/releases/5312044","Warn: release artifact 0.2.2 does not have provenance: https://api.github.com/repos/the8472/ffcnt/releases/6766073","Warn: release artifact 0.2.0 does not have provenance: https://api.github.com/repos/the8472/ffcnt/releases/6345599","Warn: release artifact 0.1.3 does not have provenance: https://api.github.com/repos/the8472/ffcnt/releases/5990385","Warn: release artifact 0.1.2 does not have provenance: https://api.github.com/repos/the8472/ffcnt/releases/5645706","Warn: release artifact 0.1.1 does not have provenance: https://api.github.com/repos/the8472/ffcnt/releases/5312044"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: RUSTSEC-2021-0139","Warn: Project is vulnerable to: RUSTSEC-2021-0145 / GHSA-g98v-hv3f-hcfr","Warn: Project is vulnerable to: RUSTSEC-2024-0375"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T06:35:01.533Z","repository_id":54440223,"created_at":"2025-08-24T06:35:01.534Z","updated_at":"2025-08-24T06:35:01.534Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281572765,"owners_count":26524253,"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","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","filesystem","hdd","linux"],"created_at":"2024-10-28T21:21:42.398Z","updated_at":"2025-10-29T06:21:55.299Z","avatar_url":"https://github.com/the8472.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Version](https://img.shields.io/crates/v/ffcnt.svg)](https://crates.io/crates/ffcnt)\n\n# ffcnt \n\nFast file counting and listing for spinning rust, in rust.\n\nffcnt's purpose is to provide a faster alternatives to some common filesystem operations as a frontend for the [platter-walk](https://github.com/the8472/platter-walk) crate.\n\n\n* `ffcnt --type f` replaces `find -type f | wc -l`\n* `ffcnt --type f --ls --leaf-order content` replaces `find -type f` and returns files in optimized order for reading \n* `ffcnt -s` replaces `du -s --apparent-size`\n\n\n\n## Requirements\n\n* Linux\n* A filesystem that supports the `fiemap` ioctl on directories.\u003cbr\u003e\nCurrently **ext4** is known to provide that. If you know other ones, please report!\u003cbr\u003e\nIncompatible filesystems will work but gain no speedup over `find`.\n\n\nYou can test filesystem support with the `filefrag` tool.  \n\n```\n## supported\n\n$ filefrag /tmp/\n/tmp/: 3 extents found\n\n\n## unsupported\n\n$ filefrag /mnt/test/\n/mnt/test/: FIBMAP unsupported\n```\n\n## Binary\n\nYou can find prebuilt x86_64-linux-glibc binaries without debug information under [releases](../../releases).\nFor troubleshooting and other environments you'll have to build your own.\n\n## Build\n\n* clone repo\n* install liblzo2 and libz (build-time dependencies) \n* install rust and cargo\n* `cargo build --release`\n\n## Usage\n\n```\nfast file counting 0.3.0\n\nUSAGE:\n    ffcnt [FLAGS] [OPTIONS] [dirs]...\n\nFLAGS:\n    -h, --help        Prints help information\n        --ls          list files\n        --prefetch    attempt to prefetch directory indices from underlying mount device. requires read permission on device\n    -s                sum apparent length of matched files. Only counts hardlinked files once. Does not follow symlinks. Implies --leaf-order inode.\n    -V, --version     Prints version information\n\nOPTIONS:\n        --leaf-order \u003cord\u003e    optimize order for listing/stat/reads [values: inode, content, dentry]\n        --type \u003ctype\u003e         filter type [values: f, l, d, s, b, c, p]\n\nARGS:\n    \u003cdirs\u003e...    directories to traverse [default: cwd]\n```\n\n## Unscientific Benchmark\n\nIdle system:\n\n```\n$ echo 3 \u003e /proc/sys/vm/drop_caches ; time find /tmp/foo/ -type f | wc -l\n826536\n\nreal\t0m52.289s\nuser\t0m0.680s\nsys\t0m4.361s\n\n$ echo 3 \u003e /proc/sys/vm/drop_caches ; time ffcnt /tmp/foo/ --type f\nfiles: 826536\n\nreal\t0m17.072s\nuser\t0m1.230s\nsys\t0m2.190s\n\n$ echo 3 \u003e /proc/sys/vm/drop_caches ; time sudo ffcnt /tmp/foo/ --prefetch --type f\nfiles: 826536\n\nreal\t0m13.311s\nuser\t0m2.029s\nsys\t0m1.440s\n```\n\nBusy system with mixed read/write workload. Differences in file counts arose due to writes happening in the meantime:\n\n```\n# echo 3 \u003e /proc/sys/vm/drop_caches ; time ffcnt . \n4411262\n\nreal\t10m36.288s\nuser\t0m3.656s\nsys\t0m7.588s\n\n# echo 3 \u003e /proc/sys/vm/drop_caches ; time find . -type f | wc -l\n4412101\n\nreal\t45m54.955s\nuser\t0m3.212s\nsys\t0m12.044s\n```\n\nBoth tests were performed on HDDs with a directory structure of at least 2 nesting levels and a branching factor of 256 \n\n\n\n\n## Ideas\n\n* 1 thread per block device in tree\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe8472%2Fffcnt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe8472%2Fffcnt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe8472%2Fffcnt/lists"}