Home

Awesome

Parallel Disk Usage (pdu)

Test Benchmark Clippy Code formatting Crates.io Version

Highly parallelized, blazing fast directory tree analyzer.

Description

pdu is a CLI program that renders a graphical chart for disk usages of files and directories, it is an alternative to dust and dutree.

Benchmark

The benchmark was generated by a GitHub Workflow and uploaded to the release page.

<details><summary>Programs</summary> </details> <figure> <img src="https://ksxgithub.github.io/parallel-disk-usage-0.10.0-benchmarks/tmp.benchmark-report.competing.block-size.svg"> <figcaption align="center"> benchmark results <em>(lower is better)</em> </figcaption> </figure>

(See more)

Demo

screenshot

asciicast of pdu command

asciicast of pdu command on /usr

Features

Limitations

Development

Prerequisites

Test

./test.sh && ./test.sh --release
<details><summary> Environment Variables </summary>
nametypedefault valuedescription
FMTtrue or falsetrueWhether to run cargo fmt
LINTtrue or falsetrueWhether to run cargo clippy
DOCtrue or falsefalseWhether to run cargo doc
BUILDtrue or falsetrueWhether to run cargo build
TESTtrue or falsetrueWhether to run cargo test
BUILD_FLAGSstring(empty)Space-separated list of flags for cargo build
TEST_FLAGSstring(empty)Space-separated list of flags for cargo test
</details>

Run

./run pdu "${arguments[@]}"

Build

Debug build

cargo build --bin pdu

The resulting executable is located at target/debug/pdu.

Release build

cargo build --bin pdu --release

The resulting executable is located at target/release/pdu.

Update shell completion files

./generate-completions.sh

Extending parallel-disk-usage

The parallel-disk-usage crate is both a binary crate and a library crate. If you desire features that pdu itself lacks (that is, after you have asked the maintainer(s) of pdu for the features but they refused), you may use the library crate to build a tool of your own. The documentation for the library crate can be found in docs.rs.

Alternatively, the pdu command provides --json-input flag and --json-output flag. The --json-output flag converts disk usage data into JSON and the --json-input flag turns said JSON into visualization. These 2 flags allow integration with other CLI tools (via pipe, as per the UNIX philosophy).

Beware that the structure of the JSON tree differs depends on the number of file/directory names that were provided (as CLI arguments):

Installation

Any Desktop OS

From GitHub

Go to the GitHub Release Page and download a binary.

From crates.io

Prerequisites:

cargo install parallel-disk-usage --bin pdu

Arch Linux

From the Arch User Repository

Prerequisites:

paru -S parallel-disk-usage-bin
paru -S parallel-disk-usage

From Khải's Pacman Repository

Follow the installation instruction then run the following command:

sudo pacman -S parallel-disk-usage

Distributions

Packaging Status

Similar programs

License

Apache 2.0 © Hoàng Văn Khải.