4.0 KiB
4.0 KiB
zfsdu - ZFS Disk Usage
A ncdu-like TUI application for ZFS with snapshot management. Navigate your ZFS pools, datasets, and volumes in a tree view, and manage snapshots interactively.
Quick Install
curl -sSL https://gitlab.datazone.de/kidev/zfsdu/-/raw/main/install-binary.sh | sudo bash
Features
- Tree View: Hierarchical display of ZFS pools, datasets, and volumes
- Expand/Collapse: Navigate the tree structure interactively
- Snapshot Management: Mark and delete multiple snapshots at once
- Size Visualization: Bar graphs showing relative sizes
- Search: Find datasets or snapshots by name
- Filter: Filter the view to show only matching items
- Bulk Selection: Select/unselect all visible snapshots (like Midnight Commander)
- Scrolling: Handle large ZFS hierarchies with scrollbar indicator
- MC-Style UI: Classic Midnight Commander look and feel
Screenshot
┌─────────────────────────────────────────────────────────────────────────┐
│ Name Size │
│─────────────────────────────────────────────────────────────────────────│
│ ▾ rpool 500.0G █████ │
│ ├──▾ ROOT 120.0G ██ │
│ │ ├── pve-1 80.0G █ │
│ │ └──○ @autosnap_2024-01-15 12.0G │
│ └──▸ data 380.0G ████ │
│ ▸ tank 2.0T █████ │
├─────────────────────────────────────────────────────────────────────────┤
│ 8 items │
└─────────────────────────────────────────────────────────────────────────┘
F1 Help F5 Refr F8 Del / Search f Filter e Expand c Collapse
Installation
Binary (recommended)
curl -sSL https://gitlab.datazone.de/kidev/zfsdu/-/raw/main/install-binary.sh | sudo bash
Build from Source
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
# Clone and build
git clone https://gitlab.datazone.de/kidev/zfsdu.git
cd zfsdu
cargo build --release
# Install
sudo cp target/release/zfsdu /usr/local/bin/
Usage
zfsdu
Keyboard Shortcuts
| Key | Action |
|---|---|
| Navigation | |
| ↑/k, ↓/j | Move up/down |
| Enter/→/l | Expand/collapse dataset |
| Home/End | First/last item |
| PgUp/PgDn | Page up/down |
| Tree | |
| e | Expand all |
| c | Collapse all |
| Selection | |
| Space | Mark/unmark snapshot |
| + | Select all visible snapshots |
| - | Unselect all visible snapshots |
| * | Invert selection |
| Search & Filter | |
| / | Search (n=next, N=prev) |
| f | Filter visible items |
| Esc | Clear filter |
| Actions | |
| d / F8 | Delete marked snapshots (2x to confirm) |
| r / F5 | Refresh |
| q / F10 | Quit |
| F1 | Help |
Requirements
- Linux with ZFS installed
- Terminal with UTF-8 support
- Root privileges (for snapshot deletion)
License
CDDL (Common Development and Distribution License) - same as OpenZFS.
See LICENSE for details.