首页/ AI 技能 / @skilllib/skill-2117939930272411426
Skill站外收录 @skilllib/skill-2117939930272411426

disk-usage

提供对 Linux 系统磁盘空间与文件系统的深度分析能力,涵盖挂载点识别、容量及 inode 使用率统计、目录层级大小分布、大文件定位与底层设备信息获取,适用于存储瓶颈诊断和容量规划场景。

0.0 (0) 20 次安装 原作者 编程导航
收录于 2026-01-22
效率工具 AI 技能

Skills.MD

# 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

评论 0

还没有评论,来抢沙发。