{"id":13539591,"url":"https://github.com/sharkdp/diskus","last_synced_at":"2025-05-14T02:07:03.909Z","repository":{"id":33234535,"uuid":"155746625","full_name":"sharkdp/diskus","owner":"sharkdp","description":"A minimal, fast alternative to 'du -sh'","archived":false,"fork":false,"pushed_at":"2024-12-27T19:25:57.000Z","size":100,"stargazers_count":1082,"open_issues_count":11,"forks_count":39,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-12T18:47:27.241Z","etag":null,"topics":["cli","command-line","filesystem","rust","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":null,"funding":null,"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},"funding":{"github":"sharkdp"}},"created_at":"2018-11-01T16:50:49.000Z","updated_at":"2025-04-09T20:45:56.000Z","dependencies_parsed_at":"2024-01-16T22:56:22.153Z","dependency_job_id":"b439b7db-761d-4cc7-a3ad-ac20f5c14468","html_url":"https://github.com/sharkdp/diskus","commit_stats":{"total_commits":96,"total_committers":12,"mean_commits":8.0,"dds":0.1875,"last_synced_commit":"30342b7c256b96c06fae850ff714fa34e7aa0e07"},"previous_names":["sharkdp/dup"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Fdiskus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Fdiskus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Fdiskus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Fdiskus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharkdp","download_url":"https://codeload.github.com/sharkdp/diskus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254052747,"owners_count":22006716,"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","rust","tool"],"created_at":"2024-08-01T09:01:28.508Z","updated_at":"2025-05-14T02:06:58.895Z","avatar_url":"https://github.com/sharkdp.png","language":"Rust","readme":"# diskus\n\n[![CICD](https://github.com/sharkdp/diskus/actions/workflows/CICD.yml/badge.svg)](https://github.com/sharkdp/diskus/actions/workflows/CICD.yml)\n\n*A minimal, fast alternative to `du -sh`.*\n\n`diskus` is a very simple program that computes the total size of the current directory. It is a\nparallelized version of `du -sh`. On my 8-core laptop, it is about ten times faster than `du` with\na cold disk cache and more than three times faster with a warm disk cache.\n\n``` bash\n\u003e diskus\n9.59 GB (9,587,408,896 bytes)\n```\n\n## Benchmark\n\nThe following benchmarks have been performed with [hyperfine](https://github.com/sharkdp/hyperfine) on\na moderately large folder (15GB, 100k directories, 400k files). Smaller folders are not really of any\ninterest since all programs would finish in a reasonable time that would not interrupt your workflow.\n\nIn addition to `du` and `diskus`, we also add [tin-summer](https://github.com/vmchale/tin-summer) (`sn`) and\n[`dust`](https://github.com/bootandy/dust) in our comparison. Both are also written in Rust and provide\nmuch more features than `diskus` (check them out!). The optimal number of threads for `sn` (`-j` option) was\ndetermined via `hyperfine --parameter-scan`.\n\n### Cold disk cache\n\n```bash\nsudo -v\nhyperfine --prepare 'sync; echo 3 | sudo tee /proc/sys/vm/drop_caches' \\\n    'diskus' 'du -sh' 'sn p -d0 -j8' 'dust -d0'\n```\n(the `sudo`/`sync`/`drop_caches` commands are a way to\n[clear the filesystem caches between benchmarking runs](https://github.com/sharkdp/hyperfine#io-heavy-programs))\n\n| Command | Mean [s] | Min [s] | Max [s] | Relative |\n|:---|---:|---:|---:|---:|\n| `diskus` | 1.746 ± 0.017 | 1.728 | 1.770 | 1.00 |\n| `du -sh` | 17.776 ± 0.549 | 17.139 | 18.413 | 10.18 |\n| `sn p -d0 -j8` | 18.094 ± 0.566 | 17.482 | 18.579 | 10.36 |\n| `dust -d0` | 21.357 ± 0.328 | 20.974 | 21.759 | 12.23 |\n\n\n### Warm disk cache\n\nOn a warm disk cache, the differences are smaller:\n```bash\nhyperfine --warmup 5 'diskus' 'du -sh' 'sn p -d0 -j8' 'dust -d0'\n```\n\n| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |\n|:---|---:|---:|---:|---:|\n| `diskus` | 500.3 ± 17.3 | 472.9 | 530.6 | 1.00 |\n| `du -sh` | 1098.3 ± 10.0 | 1087.8 | 1122.4 | 2.20 |\n| `sn p -d0 -j8` | 1122.2 ± 18.2 | 1107.3 | 1170.1 | 2.24 |\n| `dust -d0` | 3532.1 ± 26.4 | 3490.0 | 3563.1 | 7.06 |\n\n\n## Installation\n\n### On Debian-based systems\n\nYou can download the latest Debian package from the\n[release page](https://github.com/sharkdp/diskus/releases) and install it via `dpkg`:\n\n``` bash\nwget \"https://github.com/sharkdp/diskus/releases/download/v0.8.0/diskus_0.8.0_amd64.deb\"\nsudo dpkg -i diskus_0.8.0_amd64.deb\n```\n\n### On Arch-based systems\n\n``` bash\npacman -S diskus\n```\n\nOr download [diskus-bin](https://aur.archlinux.org/packages/diskus-bin/) from the AUR.\n\n### On Void-based systems\n\n``` bash\nxbps-install diskus\n```\n\n### On macOS\n\nYou can install `diskus` with [Homebrew](https://formulae.brew.sh/formula/diskus):\n```\nbrew install diskus\n```\n\nOr with [MacPorts](https://ports.macports.org/port/diskus/summary):\n```\nsudo port install diskus\n```\n\n### On Haiku\n\n``` bash\npkgman install diskus\n```\n\n### On NixOS\n\n```\nnix-env -iA nixos.diskus\n```\n\nOr add it to `environment.systemPackages` in your `configuration.nix`.\n\n### On other systems\n\nCheck out the [release page](https://github.com/sharkdp/diskus/releases) for binary builds.\n\n### Via cargo\n\nIf you have Rust 1.76 or higher, you can install `diskus` from source via `cargo`:\n```\ncargo install diskus\n```\n\n## Windows caveats\n\nWindows-internal tools such as Powershell, Explorer or `dir` are not respecting hardlinks or\njunction points when determining the size of a directory. `diskus` does the same and counts\nsuch entries multiple times (on Unix systems, multiple hardlinks to a single file are counted\njust once).\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n","funding_links":["https://github.com/sponsors/sharkdp"],"categories":["Rust","Task","File Processing","FileSystem","Other","\u003ca name=\"disk-analyzer\"\u003e\u003c/a\u003eDisk usage analyzers"],"sub_categories":["Rename all files in directory - Removes .wav for example in below"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharkdp%2Fdiskus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharkdp%2Fdiskus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharkdp%2Fdiskus/lists"}