disks/usage
Calculate the disk space used by a directory, returning total size in bytes or human-readable format. Supports exclusions, depth limits, and apparent sizes for precise storage analysis.
Instructions
Calculates the disk space used by a directory, like du -s - in bytes, or like du -sh with human_readable. Use disks/free for overall partition stats.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Write counts for all files, not just directories (-a) | |
| path | Yes | Target directory to measure | |
| exclude | No | Patterns to exclude | |
| max_depth | No | How deep to recurse (0 for summarize only) | |
| threshold | No | Exclude entries smaller than SIZE if positive, or greater than SIZE if negative (-t) | |
| privileged | No | Set to true to run as root | |
| apparent_size | No | Print apparent sizes rather than device usage (--apparent-size) | |
| output_format | No | Desired output format (e.g. json, yaml, table, wide). Defaults to text | |
| separate_dirs | No | For directories do not include size of subdirectories (-S) | |
| human_readable | No | Sizes like du -h (4.0 KiB); default is bytes | |
| one_file_system | No | Skip directories on different file systems (-x) |