View disk space usage and delete unwanted data, fast.
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
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
See the releases section for manual installation.
Via
cargo, which can be obtained using rustup
For Unix… ``` cargo install dua-cli
cargo install dua-cli --no-default-features ```
For Windows, nightly features are currently required.
cargo +nightly install dua-cli
Via
xbpson your VoidLinux system.
xbps-install dua-cli
Via
dnfon your Fedora system.
sudo dnf install dua-cli
Via
pacmanon your ArchLinux system.
sudo pacman -S dua-cli
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
ior
interactivesubcommand. 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
crosstermworks everywhere!
Why add complexity to support
termionif
crosstermworks everywhere? The answer is compile time and binary size, which both are larger when using
crossterm. Thus on Unix we still build with
termion, but there is no reason to stop supporting it once
crosstermhas no disadvantages.
The
crosstermioncrate makes handling this a bit less cumbersome.
Thanks to jwalk, all there was left to do is to write a command-line interface. As
jwalkmatures, dua should benefit instantly.
dua
tests/fixtureswhich 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)
petgraphcrate, which declares it as
unsafeto use u64 for instance.