{"id":16344518,"url":"https://github.com/siddhant-k-code/scalable-ls","last_synced_at":"2025-04-12T01:30:43.564Z","repository":{"id":226614573,"uuid":"769132860","full_name":"Siddhant-K-code/scalable-ls","owner":"Siddhant-K-code","description":"Rust implementation of: http://be-n.com/spw/you-can-list-a-million-files-in-a-directory-but-not-with-ls.html","archived":false,"fork":false,"pushed_at":"2024-03-08T13:10:24.000Z","size":61,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T21:14:05.268Z","etag":null,"topics":["linux","list-files","ls","rust","rust-lang","scaleable"],"latest_commit_sha":null,"homepage":"https://x.com/Siddhant_K_code/status/1766090204241162311?s=20","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Siddhant-K-code.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-08T12:12:41.000Z","updated_at":"2024-11-12T10:57:58.000Z","dependencies_parsed_at":"2024-03-08T15:42:20.240Z","dependency_job_id":null,"html_url":"https://github.com/Siddhant-K-code/scalable-ls","commit_stats":null,"previous_names":["siddhant-k-code/scalable-ls"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Siddhant-K-code%2Fscalable-ls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Siddhant-K-code%2Fscalable-ls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Siddhant-K-code%2Fscalable-ls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Siddhant-K-code%2Fscalable-ls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Siddhant-K-code","download_url":"https://codeload.github.com/Siddhant-K-code/scalable-ls/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248504195,"owners_count":21115133,"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":["linux","list-files","ls","rust","rust-lang","scaleable"],"created_at":"2024-10-11T00:28:33.280Z","updated_at":"2025-04-12T01:30:43.293Z","avatar_url":"https://github.com/Siddhant-K-code.png","language":"Rust","readme":"# scalable-ls\n\n\u003e Rust implementation of [this blog or discussion](http://be-n.com/spw/you-can-list-a-million-files-in-a-directory-but-not-with-ls.html)\n\n## Introduction\n\n`scalable-ls` is a Rust-based command-line tool designed to list the contents of directories containing an extremely large number of files. Traditional tools like `ls` can struggle or fail in these environments, but `scalable-ls` is optimized to handle such scenarios efficiently.\n\n## Installation\n\nEnsure you have Rust and Cargo installed on your system. Clone this repository and navigate to the project directory. Build the project using Cargo:\n\n```sh\ncargo build --release\n```\n\n## Usage\n\n### Create empty files\n\nTo create a directory and populate it with empty files under `demo-files` directory, use the following command:\n\n```sh\n./create_files.sh\n```\n\nTo list the files in a directory, use the following command:\n\n```sh\ncargo run -- [OPTIONS] \u003cPATH\u003e\n```\n\nOptions:\n\n- `-b, --buf_size \u003cBUF_SIZE\u003e`: Set the buffer size for reading directory entries (default is 5MB).\n\nExample:\n\n```sh\ncargo run -- ./demo_files/\n```\n\n```sh\ncargo run -- --buf-size 1000000 ./demo_files/\n```\n\n## Features\n\n- Handles directories with millions of files.\n- Efficient directory listing without hanging or crashing.\n- Customizable buffer size for performance tuning.\n\n## Example\n\nFor 20000 files, both seem to be working. But, it could fail for larger number of files \u0026 also output is inconsistent in native `ls` in case of large numbers of files:\n\n![image](https://github.com/Siddhant-K-code/scalable-ls/assets/55068936/4fbcade5-f4df-481f-be04-be541003422f)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiddhant-k-code%2Fscalable-ls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiddhant-k-code%2Fscalable-ls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiddhant-k-code%2Fscalable-ls/lists"}