disk-usage
Analyze disk space usage and filesystem information including mounts, usage, and large files
When & Why to Use This Skill
The Disk Usage skill for Claude provides a comprehensive toolkit for analyzing Linux filesystem health and storage distribution. It enables automated monitoring of disk space, inode usage, and block device configurations, allowing users to efficiently identify storage bottlenecks and locate space-consuming files to maintain optimal system performance.
Use Cases
- System Troubleshooting: Rapidly diagnose 'disk full' errors by identifying the largest files and directories causing storage exhaustion.
- Resource Optimization: Analyze filesystem mounts and directory sizes to plan data migration or partition resizing for better resource allocation.
- Infrastructure Maintenance: Monitor inode usage and filesystem statistics to prevent system instability in high-density file environments.
- Automated Reporting: Generate human-readable summaries of disk health and block device trees for server audits and documentation.
| name | disk-usage |
|---|---|
| description | Analyze disk space usage and filesystem information including mounts, usage, and large files |
Disk Usage Skill
Use this skill to analyze disk space and filesystem usage on Linux systems.
Quick Start
Run the included script for a disk usage overview:
./scripts/diskinfo.sh
Manual Commands
Filesystem Overview
df -h- Disk space usage for all mounted filesystems (human-readable)df -i- Inode usage (number of files)lsblk- Block device tree (disks, partitions)mount- Currently mounted filesystems
Directory Size Analysis
du -sh /path- Total size of a directorydu -h --max-depth=1 /path- Size of immediate subdirectoriesdu -ah /path | sort -rh | head -20- Largest files/directories
Finding Large Files
find /path -type f -size +100M- Files larger than 100MBfind /path -type f -size +1G- Files larger than 1GBls -lhS /path | head -20- List files sorted by size (largest first)
Disk Information
cat /proc/partitions- Partition tablecat /proc/mounts- Mount informationstat -f /path- Filesystem statistics
Tips
- Always use
-hfor human-readable sizes - The
ducommand can be slow on large directories - Use
--max-depth=1to limit recursion depth - Root filesystem (
/) usage above 90% may cause issues