360 Secure SkillHub
360 安全技能中心

Disk Usage

该 Skill 封装 du -sh 命令,用于查看指定文件或目录占用的磁盘空间,输出一行人类可读的 SIZE 与 PATH;成功返回退出码 0,路径不存在等失败情况返回非零退出码并给出错误信息。输入为单个路径参数,属于单轮调用。

分类:数据
jinwangmok
jinwangmok
热度 25.45
最近更新 2026-05-11 17:37:41

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add jinwangmok/disk-usage
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
disk-usage
version
1.0.0
description
Show disk usage of a directory or file in human-readable format. Use when the user wants to know how much space a folder or file takes.
allowed-tools
Bash(du:*)
metadata
{"openclaw":{"emoji":"💾","requires":{"bins":["du"],"env":[]},"install":[]}}

Disk Usage

Show how much disk space a directory or file uses with a single command.

Usage

du -sh <PATH>

Arguments:

# Name Description
1 PATH Path to file or directory to measure

Example

du -sh /home/user/projects

Output:

1.2G	/home/user/projects

Format: SIZE PATH

Success / Failure

  • Success: One line with human-readable size and path (exit code 0)
  • Failure: Error message (exit code non-zero, e.g. path not found)