{"id":13405799,"url":"https://github.com/Byron/dua-cli","last_synced_at":"2025-03-14T10:31:38.906Z","repository":{"id":37431744,"uuid":"189215168","full_name":"Byron/dua-cli","owner":"Byron","description":"View disk space usage and delete unwanted data, fast.","archived":false,"fork":false,"pushed_at":"2024-09-06T19:55:56.000Z","size":1607,"stargazers_count":4031,"open_issues_count":24,"forks_count":110,"subscribers_count":25,"default_branch":"main","last_synced_at":"2024-10-10T20:18:57.511Z","etag":null,"topics":["cleaner","disk","efficient","fast","space-use","terminal-based"],"latest_commit_sha":null,"homepage":"https://lib.rs/crates/dua-cli","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/Byron.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"byron"}},"created_at":"2019-05-29T11:49:29.000Z","updated_at":"2024-10-09T21:11:41.000Z","dependencies_parsed_at":"2024-01-09T14:28:00.813Z","dependency_job_id":"47bd3892-f735-439e-8773-80f26c69facd","html_url":"https://github.com/Byron/dua-cli","commit_stats":{"total_commits":760,"total_committers":38,"mean_commits":20.0,"dds":"0.46578947368421053","last_synced_commit":"d0e85fec1586a8937928472e361837ef21e40b14"},"previous_names":[],"tags_count":118,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Byron%2Fdua-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Byron%2Fdua-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Byron%2Fdua-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Byron%2Fdua-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Byron","download_url":"https://codeload.github.com/Byron/dua-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243562053,"owners_count":20311212,"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":["cleaner","disk","efficient","fast","space-use","terminal-based"],"created_at":"2024-07-30T19:02:12.076Z","updated_at":"2025-03-14T10:31:38.886Z","avatar_url":"https://github.com/Byron.png","language":"Rust","readme":"[![Rust](https://github.com/Byron/dua-cli/workflows/Rust/badge.svg)](https://github.com/byron/dua-cli/actions)\n[![Crates.io](https://img.shields.io/crates/v/dua-cli.svg)](https://crates.io/crates/dua-cli)\n[![Packaging status](https://repology.org/badge/tiny-repos/dua-cli.svg)](https://repology.org/project/dua-cli/badges)\n\n**dua** (-\u003e _Disk Usage Analyzer_) is a tool to conveniently learn about the usage of disk space of a given directory. It's parallel by default and will max out your SSD, providing relevant information as fast as possible. Optionally delete superfluous data, and do so more quickly than `rm`.\n\n[![asciicast](https://asciinema.org/a/kDnXUOeqBxZVMoWuFNqzfpeey.svg)](https://asciinema.org/a/kDnXUOeqBxZVMoWuFNqzfpeey)\n\n### Installation\n\n### Binary Release \n\n#### MacOS\n\n```sh\ncurl -LSfs https://raw.githubusercontent.com/Byron/dua-cli/master/ci/install.sh | \\\n    sh -s -- --git Byron/dua-cli --crate dua --tag v2.29.0\n```\n\n#### MacOS via [MacPorts](https://www.macports.org):\n```sh\nsudo port selfupdate\nsudo port install dua-cli\n```\n\n#### MacOS via [Homebrew](https://brew.sh)\n```sh\nbrew update\nbrew install dua-cli\n```\n\n#### Linux\n\nLinux requires the target to be specified explicitly to obtain the MUSL build.\n\n```sh\ncurl -LSfs https://raw.githubusercontent.com/Byron/dua-cli/master/ci/install.sh | \\\n    sh -s -- --git Byron/dua-cli --target x86_64-unknown-linux-musl --crate dua --tag v2.29.0\n```\n\n#### Windows via [Scoop](https://scoop.sh/)\n```sh\nscoop install dua\n```\n\n#### Pre-built Binaries\n\nSee the [releases section][releases] for manual installation of a binary, pre-built for many platforms.\n\n[releases]: https://github.com/Byron/dua-cli/releases\n\n#### Cargo\nVia `cargo`, which can be obtained using [rustup][rustup]\n\nFor _Unix_…\n```\ncargo install dua-cli\n\n# And if you don't need a terminal user interface (most compatible)\ncargo install dua-cli --no-default-features\n\n# Compiles on most platforms, with terminal user interface\ncargo install dua-cli --no-default-features --features tui-crossplatform\n```\n\nFor _Windows_, nightly features are currently required.\n```\ncargo +nightly install dua-cli\n```\n\n#### VoidLinux\nVia `xbps` on your VoidLinux system.\n\n```\nxbps-install dua-cli\n```\n\n#### Fedora\nVia `dnf` on your Fedora system.\n\n```\nsudo dnf install dua-cli\n```\n\n#### Arch Linux\nVia `pacman` on your ArchLinux system.\n\n```\nsudo pacman -S dua-cli\n```\n\n#### NixOS\nhttps://search.nixos.org/packages?channel=23.11\u0026show=dua\u0026from=0\u0026size=50\u0026sort=relevance\u0026type=packages\u0026query=dua\n\nNix-shell (temporary)\n\n```\nnix-shell -p dua\n```\n\nNixOS configuration\n\n```\n  environment.systemPackages = [\n    pkgs.dua\n  ];\n```\n\n#### NetBSD\nVia `pkgin` on your NetBSD system.\n\n```\npkgin install dua-cli\n```\n\nOr, building from source\n\n```\ncd /usr/pkgsrc/sysutils/dua-cli\nmake install\n```\n\n#### Windows\n\nYou will find pre-built binaries for Windows in the [releases section][releases].\nAlternatively, install via cargo as in\n\n```\ncargo +nightly install dua-cli\n```\n\n#### x-cmd\n\n[x-cmd](https://www.x-cmd.com/) is a **toolbox for Posix Shell**, offering a lightweight package manager built using shell and awk.\n```sh\nx env use dua\n```\n- Additionally, the [`x dua ...`](https://www.x-cmd.com/pkg/dua#dua) command is available, which automatically installs `dua` without affecting the environment, such as not modifying the `PATH` variable.\n\n### Usage\n\n```bash\n# count the space used in the current working directory\ndua\n# count the space used in all directories that are not hidden\ndua *\n# learn about additional functionality\ndua aggregate --help\n```\n\n### Interactive Mode\n\nLaunch into interactive mode with the `i` or `interactive` subcommand. Get help on keyboard\nshortcuts with `?`.\nUse this mode to explore, and/or to delete files and directories to release disk space.\n\nPlease note that great care has been taken to prevent accidential deletions due to a multi-stage\nprocess, which makes this mode viable for exploration.\n\n```bash\ndua i\ndua interactive\n```\n\n### Development\n\nPlease note that all the following assumes a unix system. On Windows, the linux subsystem should do the job.\n\n#### Run tests\n\n```bash\nmake tests\n```\n\n#### Learn about other targets\n\n```\nmake\n```\n\n#### But why is…\n\n#### …there only one available backend? `termion` was available previously.\n\nMaintaining both backends seemed more cumbersome than it's worth and add complexity I didn't like anymore. `termion` had its benefits,\nbut I never liked that it seems to have dropped out of support.\nThus `crossterm` is the only remaining backend and it's very actively developed.\n\n### Acknowledgements\n\nThanks to [jwalk][jwalk], all there was left to do is to write a command-line interface. As `jwalk` matures, **dua** should benefit instantly.\n\n### Limitations\n\n* Does not show symbolic links at all if no path is provided when invoking `dua`\n  * in an effort to skip symbolic links, for now there are pruned and are not used as a root. Symbolic links will be shown if they\n    are not a traversal root, but will not be followed.\n* Interactive mode only looks good in dark terminals (see [this issue](https://github.com/Byron/dua-cli/issues/13))\n* _easy fix_: file names in main window are not truncated if too large. They are cut off on the right.\n* There are plenty of examples in `tests/fixtures` which don't render correctly in interactive mode.\n  This can be due to graphemes not interpreted correctly. With Chinese characters for instance,\n  column sizes are not correctly computed, leading to certain columns not being shown.\n  In other cases, the terminal gets things wrong - I use alacritty, and with certain characaters it\n  performs worse than, say iTerm3.\n  See https://github.com/minimaxir/big-list-of-naughty-strings/blob/master/blns.txt for the source.\n* In interactive mode, you will need about 60MB of memory for 1 million entries in the graph.\n* In interactive mode, the maximum amount of files is limited to 2^32 - 1 (`u32::max_value() - 1`) entries.\n  * One node is used as to 'virtual' root\n  * The actual amount of nodes stored might be lower, as there might be more edges than nodes, which are also limited by a `u32` (I guess)\n  * The limitation is imposed by the underlying [`petgraph`][petgraph] crate, which declares it as `unsafe` to use u64 for instance.\n  * It's possibly *UB* when that limit is reached, however, it was never observed either.\n\n### Similar Programs \n\n* **CLI:**\n  * `du`\n  * [`dust`](https://github.com/bootandy/dust)\n  * [`dutree`](https://github.com/nachoparker/dutree)\n  * [`pdu`](https://github.com/KSXGitHub/parallel-disk-usage)\n* **TUI:**\n  * [`ncdu`](https://dev.yorhel.nl/ncdu)\n  * [`gdu`](https://github.com/dundee/gdu)\n  * [`godu`](https://github.com/viktomas/godu)\n* **GUI:**\n  * [GNOME's Disk Usage Analyzer, a.k.a. `baobab`](https://wiki.gnome.org/action/show/Apps/DiskUsageAnalyzer)\n  * [Filelight](https://apps.kde.org/filelight/)\n  \n[petgraph]: https://crates.io/crates/petgraph\n[rustup]: https://rustup.rs/\n[jwalk]: https://crates.io/crates/jwalk\n[tui]: https://github.com/fdehau/tui-rs\n","funding_links":["https://github.com/sponsors/byron"],"categories":["Rust","HarmonyOS","Files and Directories","Command Line","Command Line Tools","Tech","Lovely Commands","others","Tools","终端","命令行工具","💻 Apps","\u003ca name=\"disk-analyzer\"\u003e\u003c/a\u003eDisk usage analyzers","FileSystem","ユーティリティ他","Applications","Other"],"sub_categories":["Windows Manager","Disk Usage","Dependency Management","Tools","Rust","资源传输下载","👨‍💻 System Administration","System tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FByron%2Fdua-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FByron%2Fdua-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FByron%2Fdua-cli/lists"}