Added -j option for JSON output

Added -n option to disable color output
Added -s option to sort drives by size, usage, mount point, or name
Refactored code
This commit is contained in:
Lennart Martens committed 2025-11-22 17:56:12 +01:00
1 parent 30d6ad50d8
commit 589e1d7b32
3 files changed
+307 -122

No files matched your search

+17
View File
@@ -11,6 +11,23 @@ A lightweight command-line tool to monitor disk usage on Linux systems with beau
- **Human-Readable Sizes**: Displays sizes in B, KB, MB, GB, TB format
- **Terminal Responsive**: Adapts to terminal width for optimal display
- **Detailed Information**: Shows mount point, filesystem type, device path, UUID, label, mount options, used, available and inodes + SMART status (only as root)
- **JSON Output**: Export drive information in JSON format for easy parsing
- **Sorting**: Sort drives by size, usage, mount point, or name
- **No Color Mode**: Disable ANSI colors for scripts or logs
## Usage
```bash
drinfo [OPTIONS]
```
### Options
- `-h, --help`: Show help message
- `-v, --version`: Show program version
- `-j, --json`: Output in JSON format
- `-n, --no-color`: Disable color output
- `-s, --sort TYPE`: Sort drives by TYPE (`size`, `usage`, `mount`, `name`)
## Build executable: drinfo