Crates.io | dua-cli |
lib.rs | dua-cli |
version | 2.29.0 |
source | src |
created_at | 2019-06-01 11:12:19.405353 |
updated_at | 2024-03-10 07:28:35.115548 |
description | A tool to conveniently learn about the disk usage of directories, fast! |
homepage | |
repository | https://github.com/Byron/dua-cli |
max_upload_size | |
id | 138294 |
size | 438,634 |
dua (-> 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
.
curl -LSfs https://raw.githubusercontent.com/Byron/dua-cli/master/ci/install.sh | \
sh -s -- --git Byron/dua-cli --crate dua --tag v2.17.4
sudo port selfupdate
sudo port install dua-cli
brew update
brew install dua-cli
Linux requires the target to be specified explicitly to obtain the MUSL build.
curl -LSfs https://raw.githubusercontent.com/Byron/dua-cli/master/ci/install.sh | \
sh -s -- --git Byron/dua-cli --target x86_64-unknown-linux-musl --crate dua --tag v2.17.4
scoop install dua
See the releases section for manual installation of a binary, pre-built for many platforms.
Via cargo
, which can be obtained using rustup
For Unix…
cargo install dua-cli
# And if you don't need a terminal user interface (most compatible)
cargo install dua-cli --no-default-features
# Compiles on most platforms, with terminal user interface
cargo install dua-cli --no-default-features --features tui-crossplatform
For Windows, nightly features are currently required.
cargo +nightly install dua-cli
Via xbps
on your VoidLinux system.
xbps-install dua-cli
Via dnf
on your Fedora system.
sudo dnf install dua-cli
Via pacman
on your ArchLinux system.
sudo pacman -S dua-cli
Nix-shell (temporary)
nix-shell -p dua
NixOS configuration
environment.systemPackages = [
pkgs.dua
];
Via pkgin
on your NetBSD system.
pkgin install dua-cli
Or, building from source
cd /usr/pkgsrc/sysutils/dua-cli
make install
You will find pre-built binaries for Windows in the releases section. Alternatively, install via cargo as in
cargo +nightly install dua-cli
# count the space used in the current working directory
dua
# count the space used in all directories that are not hidden
dua *
# learn about additional functionality
dua aggregate --help
Launch into interactive mode with the i
or interactive
subcommand. Get help on keyboard
shortcuts with ?
.
Use this mode to explore, and/or to delete files and directories to release disk space.
Please note that great care has been taken to prevent accidential deletions due to a multi-stage process, which makes this mode viable for exploration.
dua i
dua interactive
Please note that all the following assumes a unix system. On Windows, the linux subsystem should do the job.
make tests
make
termion
was available previously.Maintaining both backends seemed more cumbersome than it's worth and add complexity I didn't like anymore. termion
had its benefits,
but I never liked that it seems to have dropped out of support.
Thus crossterm
is the only remaining backend and it's very actively developed.
Thanks to jwalk, all there was left to do is to write a command-line interface. As jwalk
matures, dua should benefit instantly.
dua
tests/fixtures
which don't render correctly in interactive mode.
This can be due to graphemes not interpreted correctly. With Chinese characters for instance,
column sizes are not correctly computed, leading to certain columns not being shown.
In other cases, the terminal gets things wrong - I use alacritty, and with certain characaters it
performs worse than, say iTerm3.
See https://github.com/minimaxir/big-list-of-naughty-strings/blob/master/blns.txt for the source.u32::max_value() - 1
) entries.
u32
(I guess)petgraph
crate, which declares it as unsafe
to use u64 for instance.