disk-usage
Disk Usage Skill
Analyzes disk space and filesystem usage on Linux systems.
Suggested Workflow
- Run
./scripts/diskinfo.shfor a structured overview of mounts, block devices, and top directories. - Check
df -houtput for any filesystem above 80% usage. - Drill into high-usage mounts with
du -h --max-depth=1 /mountto find large subdirectories. - Locate specific large files with
find /path -type f -size +100M.
Commands Reference
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 - Root filesystem (
/) usage above 90% may cause issues
More from ukgovernmentbeis/inspect_ai
network-info
Gather network configuration and connectivity details on Linux including interfaces, IP addresses, routing tables, DNS settings, and listening ports. Use when the user asks about IP configuration, network interfaces, connection issues, DNS resolution, open ports, routing, or network troubleshooting.
60system-info
Retrieve detailed Linux system information including OS distribution, kernel version, CPU model and core count, memory usage, and uptime. Use when the user asks about system specs, hardware details, RAM, processor info, kernel version, or needs a host inventory summary.
57secret-code
Retrieve a secret code by reading a bundled asset file and executing a companion script. Use when the user asks to reveal, decode, or look up the secret code from this skill's assets.
50