# pdu

> Parallelized disk usage analyzer that renders graphical charts for directory tree analysis

Stars: 741 · Language: Rust · License: Apache-2.0 · Categories: System

- Repository: https://github.com/KSXGitHub/parallel-disk-usage
- Website: https://crates.io/crates/parallel-disk-usage
- Page: https://www.trmn.sh/tools/pdu

## Install

- Pacman: `sudo pacman -S parallel-disk-usage`
- Cargo: `cargo install parallel-disk-usage --bin pdu`

## Overview

pdu is a CLI directory tree analyzer that calculates and visualizes disk usage with parallel processing. It generates graphical charts showing file and directory sizes, serving as an alternative to tools like dust and dutree. The tool leverages parallel computation to analyze directory structures quickly, displaying results in visual tree formats with customizable depth and chart sizing.

The tool supports hardlink detection and deduplication, progress reporting, and offers both library and JSON interfaces for extensibility. It can output data as JSON using the --json-output flag and accept JSON input with --json-input, enabling integration with other CLI tools through standard Unix pipes. pdu treats all hardlinks as equally real by default but provides options for deduplication when needed.

Benchmark results show pdu performs competitively against similar tools like dust, dua, ncdu, and gdu across different directory sizes. The tool is primarily targeted at system administrators and developers who need fast disk usage analysis with visual output, though it has limitations including ignorance of reflinks from COW filesystems and no symbolic link following.

### Installation

```bash
# via Pacman
sudo pacman -S parallel-disk-usage
```

```bash
# via Cargo
cargo install parallel-disk-usage --bin pdu
```

![pdu CLI output showing directory tree visualization](https://media.trmn.sh/cached/28a9084a5de17433db124e7c81904117c629f64cf39e83e232bf6ec41d251e90.png)

![pdu command demonstration](https://asciinema.org/a/416663.svg)

![pdu analyzing /usr directory](https://asciinema.org/a/416664.svg)

## Alternatives

- [wiremix](https://www.trmn.sh/tools/wiremix.md): TUI audio mixer for PipeWire that controls volumes, routes audio between devices and applications, and configures audio settings. (Rust, 1.1k stars)
- [kbt](https://www.trmn.sh/tools/kbt.md): Terminal-based keyboard testing tool for checking key functionality across multiple layouts (Rust, 391 stars)
- [g1c](https://www.trmn.sh/tools/g1c.md): Terminal UI for monitoring and managing Google Cloud VM instances with real-time updates and instance operations (Rust, 41 stars)
- [ecscope](https://www.trmn.sh/tools/ecscope.md): TUI for monitoring AWS ECS services, tasks, and containers across multiple clusters and regions in a unified view. (Rust, 14 stars)
- [oxker](https://www.trmn.sh/tools/oxker.md): Rust TUI for viewing and controlling Docker containers, with log viewing, search, filtering, sorting, inspect and exec, configurable via TOML/JSON. (Rust, 2.0k stars)

## Guides

- [Modern Replacements for du](https://www.trmn.sh/replace/du): Compare dust, dua, erdtree and pdu as replacements for du: output format, filtering, JSON output, gitignore handling and interactive deletion.
- [Best Disk Usage Analyzers](https://www.trmn.sh/best/disk-usage-analyzers): Compare dust, dua, and diskonaut plus pdu, cull and erdtree for finding what fills your disk from the terminal.

---

Canonical: https://www.trmn.sh/tools/pdu
