跳到主要内容

系统 · 命令参考

qzx diagnoseStorage

作用

结合容量、大文件和已验证重复项诊断存储压力,不删除或修改任何文件。

命令成熟度:Alpha

可用于真实使用和反馈,但其接口与行为仍可能继续演进。 这是当前开发 checkout 的评估。未来每个不可变发布标签都会保留该版本中包含的准确评估。 可在 PyPI 0.2.2.0.9 使用。文档对应 alpha checkout 0.2.2.0.9。

行为与内置保护

只检查,不改变状态

此操作直接执行

无需调用原生程序即可运行

无需网络即可运行

设计为无需提权即可运行

这是严格只读诊断:不会删除或修改文件。大文件仅作为审查证据展示,绝不会自动视为可删除内容。潜在可回收空间只根据经大小、SHA-256 和逐字节比较确认的重复组计算。物理 S.M.A.R.T. 健康状态仍由 getDiskHealth 单独处理。

此安全分类由 OpenAI GPT-5.6 Sol 于 2026-09-04 对照实现摘要 sha256:3f388a34b22a9b59259ba7c46dfec7a8ff570030f038c1a0aeba9b8f8a936bb9 审阅。

准确语法

qzx diagnoseStorage [path] [min_file_size] [max_files] [duplicate_min_size_kb] [max_depth] [include_duplicates] --json

参数

滑动或使用横向滚动条查看所有列。

名称类型必填默认值描述
pathstr"."要诊断存储使用情况的目录(默认:当前目录)
min_file_sizestr"100MiB"大文件视图的最小大小,例如 100MiB 或 1GB
max_filesint20返回的大文件最大数量(1-1000)
duplicate_min_size_kbint10240重复项搜索中考虑的最小 KB 大小(默认 10240 = 10 MiB)
max_depthint6查找大文件和重复项的最大目录深度(0-64;默认:6)
include_duplicatesbooltrue在同一流程中执行逐字节验证的重复项搜索(true/false;默认启用)

输入示例

qzx diagnoseStorage

使用有界搜索诊断当前目录的存储压力

qzx diagnoseStorage C:/ --max-depth 4 --max-files 30

以较浅深度和更长的大文件列表检查 Windows 卷

qzx diagnoseStorage /home --include-duplicates false --min-file-size 500MiB

不计算重复项哈希,执行更快的容量和大文件诊断

要获得完整结构化载荷,请添加 --json: qzx diagnoseStorage [path] [min_file_size] [max_files] [duplicate_min_size_kb] [max_depth] [include_duplicates] --json

实测输出示例

使用 Windows 11 上的 QZX 0.2.2.0.9 捕获;退出码 0。依赖主机的值和耗时可能不同。

示例命令: qzx diagnoseStorage ../artifacts/qzx-evidence/storage-triage --min-file-size 1KB --max-files 10 --duplicate-min-size-kb 1 --max-depth 2 --json

{
    "success": true,
    "message": "Storage diagnosis completed for 'C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\storage-triage': 98.7% used with 45.00 GB free; 3 files matched the large-file threshold. Confirmed 1 duplicate group with up to 9.75 KB reclaimable if one copy per group is kept. QZX did not delete or modify any files.",
    "path": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\storage-triage",
    "partial": false,
    "read_only": true,
    "scan_scope": {
        "max_depth": 2,
        "large_file_min_size": "1KB",
        "max_large_files_returned": 10,
        "duplicate_scan_requested": true,
        "duplicate_min_size_kb": 1
    },
    "probe_status": {
        "capacity": "ok",
        "large_files": "ok",
        "duplicates": "ok"
    },
    "assessment": {
        "capacity_status": "critical",
        "percent_used": 98.7,
        "total_bytes": 3718889074688,
        "total_readable": "3.38 TB",
        "free_bytes": 48314122240,
        "free_readable": "45.00 GB",
        "large_files_matched": 3,
        "large_files_returned": 3,
        "duplicate_groups": 1,
        "duplicate_files": 2,
        "confirmed_reclaimable_bytes": 9984,
        "confirmed_reclaimable_readable": "9.75 KB"
    },
    "capacity": {
        "success": true,
        "message": "Disk information for 'C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\storage-triage': 3.34 TB used of 3.38 TB total (98.7% used), 45.00 GB free.",
        "disk_info": {
            "path": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\storage-triage",
            "total_bytes": 3718889074688,
            "used_bytes": 3670574952448,
            "free_bytes": 48314122240,
            "total": "3.38 TB",
            "used": "3.34 TB",
            "free": "45.00 GB",
            "percent": 98.7
        }
    },
    "large_files": {
        "success": true,
        "message": "Found 3 matching files in 'C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\storage-triage'. Returning 3 files totaling 26.25 KiB.",
        "search_path": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\storage-triage",
        "pattern": "*",
        "recursive": 2,
        "filters": {
            "min_size_bytes": 1024,
            "max_size_bytes": null,
            "modified_after": null,
            "modified_before": null,
            "exclude": [],
            "exclude_dirs": []
        },
        "sort": {
            "by": "size",
            "descending": true
        },
        "matched_count": 3,
        "matched_size_bytes": 26880,
        "matched_size_readable": "26.25 KiB",
        "count": 3,
        "total_size_bytes": 26880,
        "total_size_readable": "26.25 KiB",
        "limit": 10,
        "truncated": false,
        "skipped_unreadable": 0,
        "warnings": [],
        "results": [
            {
                "name": "duplicate-a.bin",
                "path": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\storage-triage\\duplicate-a.bin",
                "relative_path": "duplicate-a.bin",
                "depth": 0,
                "size_bytes": 9984,
                "size_readable": "9.75 KiB",
                "modified_timestamp": 1789069884.4857178,
                "modified_at": "2026-09-10T14:51:24-05:00"
            },
            {
                "name": "duplicate-b.bin",
                "path": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\storage-triage\\duplicate-b.bin",
                "relative_path": "duplicate-b.bin",
                "depth": 0,
                "size_bytes": 9984,
                "size_readable": "9.75 KiB",
                "modified_timestamp": 1789069884.4865727,
                "modified_at": "2026-09-10T14:51:24-05:00"
            },
            {
                "name": "unique.bin",
                "path": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\storage-triage\\unique.bin",
                "relative_path": "unique.bin",
                "depth": 0,
                "size_bytes": 6912,
                "size_readable": "6.75 KiB",
                "modified_timestamp": 1789069884.4865727,
                "modified_at": "2026-09-10T14:51:24-05:00"
            }
        ]
    },
    "duplicates": {
        "success": true,
        "scan_path": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\storage-triage",
        "total_groups": 1,
        "total_duplicate_files": 2,
        "reclaimable_bytes": 9984,
        "reclaimable_space_readable": "9.75 KB",
        "duplicate_groups": {
            "2467aef9f30a32bd4940b61dc4cd366c8c4f1677f514591d8cf1e0acf61f158e": {
                "sha256": "2467aef9f30a32bd4940b61dc4cd366c8c4f1677f514591d8cf1e0acf61f158e",
                "verification": "byte_for_byte",
                "size_bytes": 9984,
                "size_readable": "9.75 KB",
                "files": [
                    "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\storage-triage\\duplicate-a.bin",
                    "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\storage-triage\\duplicate-b.bin"
                ]
            }
        },
        "message": "Duplicate files scan completed for 'C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\storage-triage':\n- Duplicate groups identified: 1\n- Total duplicate file copies: 2\n- Reclaimable space: 9.75 KB\n\nTop Duplicate Groups:\n  - [9.75 KB] SHA-256: 2467aef9f30a... (byte-for-byte verified)\n    -> duplicate-a.bin\n    -> duplicate-b.bin\n"
    },
    "recommendations": [
        {
            "priority": "high",
            "action": "Review the largest files and confirmed duplicate groups before adding more data.",
            "reason": "The target filesystem is 98.7% used."
        },
        {
            "priority": "review",
            "action": "Inspect the returned large-file paths and decide which are intentional; size alone is never a deletion signal.",
            "reason": "Files at or above 1KB were found within depth 2."
        },
        {
            "priority": "review",
            "action": "Review each duplicate group and keep at least one intentional copy before removing anything manually.",
            "reason": "Byte-for-byte verification found 1 group with up to 9.75 KB reclaimable."
        },
        {
            "priority": "info",
            "action": "Use getDiskHealth separately only when hardware health is relevant; capacity pressure does not imply a failing disk.",
            "reason": "S.M.A.R.T. health and filesystem capacity are separate diagnostic questions."
        }
    ],
    "warnings": [],
    "related_commands": [
        "getDiskSpace",
        "findFiles",
        "findDuplicateFiles",
        "getDiskHealth"
    ],
    "report": "Storage diagnosis: C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\storage-triage\nCapacity: 98.7% used; 45.00 GB free of 3.38 TB. Status: critical.\nLarge files: 3 matched; 3 returned for review.\nDuplicates: 1 verified group(s), 2 duplicate file(s), up to 9.75 KB reclaimable if one copy per group is kept.\nSafety: read-only diagnosis; QZX did not delete or modify files.",
    "meta": {
        "command": "diagnoseStorage",
        "command_maturity": {
            "stage": "alpha",
            "label": "Alpha",
            "sequence": 2,
            "public_executable": true,
            "stability": "interface_may_change",
            "summary": "Available for real use and feedback while its interface and behavior can still evolve.",
            "promotion_review_required": false,
            "assessment_scope": "development_checkout"
        },
        "duration_ms": 9.471,
        "schema_version": 1
    }
}
查看 JSON 结果契约
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "required": [
        "success",
        "message",
        "meta"
    ],
    "properties": {
        "success": {
            "type": "boolean"
        },
        "message": {
            "type": "string"
        },
        "meta": {
            "type": "object",
            "required": [
                "command",
                "command_maturity",
                "duration_ms",
                "schema_version"
            ],
            "properties": {
                "command": {
                    "type": "string"
                },
                "command_maturity": {
                    "type": "object",
                    "required": [
                        "stage",
                        "label",
                        "sequence",
                        "public_executable",
                        "stability",
                        "summary",
                        "promotion_review_required",
                        "assessment_scope"
                    ],
                    "properties": {
                        "stage": {
                            "type": "string"
                        },
                        "label": {
                            "type": "string"
                        },
                        "sequence": {
                            "type": "integer"
                        },
                        "public_executable": {
                            "type": "boolean"
                        },
                        "stability": {
                            "type": "string"
                        },
                        "summary": {
                            "type": "string"
                        },
                        "promotion_review_required": {
                            "type": "boolean"
                        },
                        "assessment_scope": {
                            "type": "string"
                        },
                        "note": {
                            "type": "string"
                        },
                        "review": {
                            "type": "object",
                            "required": [
                                "reviewed_on",
                                "rationale",
                                "evidence"
                            ],
                            "properties": {
                                "reviewed_on": {
                                    "type": "string",
                                    "format": "date"
                                },
                                "rationale": {
                                    "type": "string"
                                },
                                "evidence": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "replacement": {
                                    "type": "string"
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    "additionalProperties": true
                },
                "duration_ms": {
                    "type": "number"
                },
                "schema_version": {
                    "type": "integer"
                }
            },
            "additionalProperties": true
        },
        "assessment": [],
        "capacity": [],
        "details": [],
        "duplicates": [],
        "error": [],
        "error_code": [],
        "large_files": [],
        "partial": [],
        "path": [],
        "probe_status": {
            "type": "object",
            "properties": {
                "capacity": {
                    "type": "string"
                },
                "large_files": {
                    "type": "string"
                },
                "duplicates": []
            },
            "additionalProperties": true
        },
        "read_only": {
            "type": "boolean"
        },
        "recommendations": [],
        "related_commands": {
            "type": "array"
        },
        "report": [],
        "scan_scope": {
            "type": "object",
            "properties": {
                "max_depth": [],
                "large_file_min_size": [],
                "max_large_files_returned": [],
                "duplicate_scan_requested": [],
                "duplicate_min_size_kb": []
            },
            "additionalProperties": true
        },
        "warnings": []
    },
    "additionalProperties": true
}

错误与限制

公开契约要求失败时返回 success=false 和具有描述性的 message。此目录尚未为每个命令声明专门的错误分类;请检查结果,不要推断不存在的错误码。

QZX 仍处于 alpha 阶段。可选依赖、权限和主机能力可能影响结果。

证据流程:已捕获并通过摘要验证。

证据与来源

文档渠道
开发文档 0.2.2.0.9 · main · sha256:cfba936e39931c286ca23add0ae546693db17d8b316e7cbc3891d26642d9b7e8
可用性
0.2.2.0.9 或更早

继续探索

这些命令同样属于 系统 类别。对比它们,选择最适合解决任务的操作。

浏览所有 QZX 命令