Calculate used, free and total disk space percentages for a Linux filesystem.
Total used space is estimated by multiplying the number of files by their average size, mirroring the rough math behind the `du` command's summary output. Comparing that estimate to the total disk capacity yields a usage percentage, which is flagged as a warning at 80% and critical at 95% — the same thresholds most Linux monitoring tools default to.
Used space
used = file_count × avg_file_size
Usage percentage
used% = (used / total_disk) × 100
Real filesystems round each file up to a multiple of the block size and also store metadata (inodes, directory entries), so actual usage from `du` or `df` is typically higher than file_count × average_size, especially with many small files.
Most monitoring setups warn at 80% and escalate to critical at 90-95%, leaving headroom for logs, temp files and snapshots before the filesystem fills completely.
This calculator projects usage from file count and average size — useful for capacity planning before files exist. The Filesystem Utilization Calculator works from actual used/total block counts reported by `df`.