# erdtree

> Multi-threaded filesystem and disk usage utility with gitignore awareness, multiple layouts, and file search capabilities

Stars: 2.6k · Categories: File Management

- Repository: https://github.com/solidiquis/erdtree
- Website: https://crates.io/crates/erdtree
- Page: https://www.trmn.sh/tools/erdtree

## Install

- Homebrew: `brew install erdtree`
- Cargo: `cargo install erdtree`
- Scoop: `scoop install erdtree`

## Overview

erdtree is a cross-platform filesystem and disk usage analyzer that combines functionality from du, tree, find, wc, and ls into a single multi-threaded tool. It traverses directories while respecting .gitignore files and hidden file rules by default, providing disk usage analysis using various metrics including bytes (logical or physical), blocks, word count, or line count.

The tool offers multiple output layouts including regular tree view, inverted tree, and flat du-like output. It supports Unix-style long view with file permissions, ownership, and timestamps, plus regular expression and glob-based file searching with filtering by file type. Additional features include granular sorting options, icon display, LS_COLORS colorization, and configurable parallelism with up to 10 threads by default.

erdtree targets developers and system administrators who need comprehensive filesystem analysis with modern features like gitignore integration and flexible output formats. The tool provides TOML-based configuration files for custom defaults and supports shell completions for bash, fish, zsh, and other shells.

### Installation

```bash
# via Homebrew
brew install erdtree
```

```bash
# via Cargo
cargo install erdtree
```

```bash
# via Scoop
scoop install erdtree
```

![erdtree output showing filesystem tree with disk usage](https://media.trmn.sh/cached/5ad32e7fa5f6408e3bf28a8b89d88d4c51a719a26fa87e9f05958fa328289bd9.png)

## Alternatives

- [fclones](https://www.trmn.sh/tools/fclones.md): Command-line duplicate file finder and remover with parallel processing and multiple deduplication strategies. (3.0k stars)
- [diskonaut](https://www.trmn.sh/tools/diskonaut.md): Interactive disk usage analyzer with treemap visualization for exploring and cleaning up disk space (3.1k stars)
- [viu](https://www.trmn.sh/tools/viu.md): Rust command-line image viewer for the terminal using the iTerm or Kitty graphics protocols, with a half-block fallback and animated GIF support. (Rust, 3.3k stars)
- [xleak](https://www.trmn.sh/tools/xleak.md): Excel file viewer and interactive TUI for terminal with multi-sheet support and export capabilities (Rust, 1.5k stars)
- [doxx](https://www.trmn.sh/tools/doxx.md): Terminal-native .docx document viewer with formatting, search, and export capabilities (3.8k 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.
- [Modern Replacements for tree](https://www.trmn.sh/replace/tree): Tools you can run instead of tree: eza, erdtree, lsd and broot compared by tree output, gitignore handling, flags and config.
- [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/erdtree
