disk-usage
Analyze disk space usage and filesystem information including mounts, usage, and large files
Packaged view
This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.
Install command
npx @skill-hub/cli install ukgovernmentbeis-inspect-ai-disk-usage
Repository
Skill path: examples/skills/skills/disk-usage
Analyze disk space usage and filesystem information including mounts, usage, and large files
Open repositoryBest for
Primary workflow: Ship Full Stack.
Technical facets: Full Stack.
Target audience: everyone.
License: Unknown.
Original source
Catalog source: SkillHub Club.
Repository owner: UKGovernmentBEIS.
This is still a mirrored public skill entry. Review the repository before installing into production workflows.
What it helps with
- Install disk-usage into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
- Review https://github.com/UKGovernmentBEIS/inspect_ai before adding disk-usage to shared team environments
- Use disk-usage for development workflows
Works across
Favorites: 0.
Sub-skills: 0.
Aggregator: No.
Original source / Raw SKILL.md
---
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:
```bash
./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 directory
- `du -h --max-depth=1 /path` - Size of immediate subdirectories
- `du -ah /path | sort -rh | head -20` - Largest files/directories
### Finding Large Files
- `find /path -type f -size +100M` - Files larger than 100MB
- `find /path -type f -size +1G` - Files larger than 1GB
- `ls -lhS /path | head -20` - List files sorted by size (largest first)
### Disk Information
- `cat /proc/partitions` - Partition table
- `cat /proc/mounts` - Mount information
- `stat -f /path` - Filesystem statistics
## Tips
- Always use `-h` for human-readable sizes
- The `du` command can be slow on large directories
- Use `--max-depth=1` to limit recursion depth
- Root filesystem (`/`) usage above 90% may cause issues
---
## Referenced Files
> The following files are referenced in this skill and included for context.
### scripts/diskinfo.sh
```bash
#!/bin/bash
# Disk Information Script
# Outputs disk usage and filesystem details in a structured format
echo "=== DISK INFORMATION ==="
echo
echo "--- Filesystem Usage ---"
df -h 2>/dev/null | head -15
echo
echo "--- Block Devices ---"
if command -v lsblk &> /dev/null; then
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT 2>/dev/null
else
cat /proc/partitions
fi
echo
echo "--- Largest Directories in / ---"
du -h --max-depth=1 / 2>/dev/null | sort -rh | head -10
echo
echo "--- Mount Points ---"
mount | grep -E '^/dev' | head -10
```