Build Status

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.

asciicast

Installation

Binary Release

sh curl -LSfs https://japaric.github.io/trust/install.sh | \ sh -s -- --git byron/dua-cli --crate dua

Cargo

Via cargo, which can be obtained using rustup

cargo install dua-cli

VoidLinux

Via xbps on your VoidLinux system.

xbps-install dua-cli

Fedora

Via dnf on your Fedora system.

sudo dnf install dua-cli

Usage

```bash

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 ```

Interactive Mode

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.

bash dua i dua interactive

Roadmap

🚧v2.3 - Various features and fixes as they come up while people are using it

Other Features

✅ v2.3.7 Upgrade to filesize 0.2.0 from 0.1.0; update dependency versions

✅ v2.3.6 Upgrade to jwalk 0.5 bringing better threading control and no symlink following during traversal

✅ v2.3.5 Fast exit from interactive mode for a responsive exit; dependency updates (except jwalk)

✅ v2.3.4 YANKED - jwalk 0.5.0 wasn't used correctly which led to a performance regression

✅ v2.3.3 YANKED - journey tests failed to changed method signature

✅ v2.3.2 Incude the license file in crate

✅ v2.3.1 Include .md files in Crate, update dependencies

✅ v2.3 Show size on disk by default; Dependency Update

Thanks to this PR, hard links are now not counted anymore. The -l flag will count hard links as it did before.

And of course, this has no noticable performance impact.

✅ v2.2 Show size on disk by default; Dependency Update

Thanks to this PR, the old apparent size can be displayed with the -A flag, and the much more useful 'size on disk' is now shown by default.

To my pleasant surprise, this does not seem to affect performance at all - everything stays speedy.

✅ v2.1.13-- Dependency Update; Github Releases

Binaries for Linux and MacOS are now available on GitHub Releases.

✅ v2.1.12-- More obvious highlighting of active panel

Depending on the terminal used, it might not have been obvious which panel was active. This might be confusing to new and current users. Now the color of the widget frame is changed to light gray, instead of remaining gray.

✅ v2.1.11 - Finally fix symlink handling

dua will not follow symbolic links when deleting directories. Thank a ton, @vks!

Technical Notes: Handling symbolic links properly is impossible without usage of symlink_metadata().

✅ v2.1.10 - compatibility with light terminals

✅ v2.1.9 - improved handling of broken symlinks

✅ v2.1.8 - don't follow symbolic links when deleting directories

A critical bug was discovered which would lead to deletion of unwanted directories as dua would follow symbolic links during traversal during deletion.

Please note that symbolic links to files would be treated correctly, only removing the symbolic link.

This is now fixed.

✅ v2.1.7 - use latest version of open-rs

That way, pressing shift + O to open the currently selected file won't possibly spam the terminal with messages caused by the program used to find the system program to open the file.

Fixes #14

✅ v2.1.5 - re-release with Cargo.lock

✅ v2.1.2 bug fixes and improvements

✅ v2.1.1 bug fixes and improvements

✅ v2.1.0- bug fixes and improvements

✅ v2.0.1- bug fixes and improvements

✅ v2.0.0 - interactive visualization of directory sizes with an option to queue their deletion

A sub-command bringing up a terminal user interface to allow drilling into directories, and clearing them out, all using the keyboard exclusively.

Other Features

✅v1.2 (released) - - the first usable, read-only interactive terminal user interface

That's that. We also use tui-react, something that makes it much more pleasant to handle the application and GUI state.

✅v1.0 (released) - aggregate directories, fast

Simple CLI to list top-level directories similar to sn-sort, but faster and more tailored to getting an idea of where most space is used.

Development

Run tests

bash make tests

Learn about other targets

make

Acknowledgements

Thanks to jwalk, all there was left to do is to write a command-line interface. As jwalk matures, dua should benefit instantly.

Limitations