跳到主要内容

文件 · 命令参考

qzx findFiles

作用

按名称、深度、大小和修改日期查找文件,并返回结构化元数据。

命令成熟度:Alpha

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

行为与内置保护

只检查,不改变状态

此操作直接执行

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

无需网络即可运行

设计为无需提权即可运行

此安全分类由 OpenAI GPT-5.6 Pro 于 2026-08-25 对照实现摘要 sha256:12717a5382f7fc0b8b27847c67aaf89741ae65a55241683f7b293715ee2e279b 审阅。

准确语法

qzx findFiles [search_path] [pattern] [recursive] [min_size] [max_size] [modified_after] [modified_before] [exclude] [exclude_dirs] [sort_by] [descending] [limit] --json

参数

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

名称类型必填默认值描述
search_pathstr"."搜索开始目录
patternstr"*"文件名 glob 模式,例如 *.txt 或 data-???.csv;默认包含所有文件
recursivestr"-r"深度:-r 不限,false 仅当前目录,-rN 最多 N 层
min_sizestr未声明最小大小,例如 500KB、10MiB 或字节数
max_sizestr未声明最大大小,例如 2GB、20MiB 或字节数
modified_afterstr未声明仅包含在 YYYY-MM-DD、"today" 或 "yesterday" 当日或之后修改的文件
modified_beforestr未声明仅包含在 YYYY-MM-DD、"today" 或 "yesterday" 之前修改的文件
excludestr未声明要排除的文件名 glob 模式,以逗号分隔
exclude_dirsstr未声明要跳过的目录名 glob 模式,以逗号分隔
sort_bystr"path"按 path、name、size 或 modified 排序
descendingboolfalse反转所选排序(true/false)
limitstr未声明排序后返回的最大文件数量

输入示例

qzx findFiles . "*.py" --exclude-dirs ".git,.venv"

递归查找 Python 文件并跳过常见元数据目录

qzx findFiles Downloads "*" --min-size 100MiB --sort-by size --descending true --limit 20

返回匹配的至少 100 MiB 的 20 个最大文件

qzx findFiles logs "*.log" --modified-after 2026-07-01 --recursive false

不遍历子目录,查找最近修改的日志

要获得完整结构化载荷,请添加 --json: qzx findFiles [search_path] [pattern] [recursive] [min_size] [max_size] [modified_after] [modified_before] [exclude] [exclude_dirs] [sort_by] [descending] [limit] --json

实测输出示例

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

示例命令: qzx findFiles ../artifacts/qzx-evidence/find-files "*.txt" -r --json

{
    "success": true,
    "message": "Found 2 matching files in 'C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\find-files'. Returning 2 files totaling 13.00 B.",
    "search_path": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\find-files",
    "pattern": "*.txt",
    "recursive": "unlimited",
    "filters": {
        "min_size_bytes": null,
        "max_size_bytes": null,
        "modified_after": null,
        "modified_before": null,
        "exclude": [],
        "exclude_dirs": []
    },
    "sort": {
        "by": "path",
        "descending": false
    },
    "matched_count": 2,
    "matched_size_bytes": 13,
    "matched_size_readable": "13.00 B",
    "count": 2,
    "total_size_bytes": 13,
    "total_size_readable": "13.00 B",
    "limit": null,
    "truncated": false,
    "skipped_unreadable": 0,
    "warnings": [],
    "results": [
        {
            "name": "alpha.txt",
            "path": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\find-files\\alpha.txt",
            "relative_path": "alpha.txt",
            "depth": 0,
            "size_bytes": 7,
            "size_readable": "7.00 B",
            "modified_timestamp": 1789069883.9995615,
            "modified_at": "2026-09-10T14:51:23-05:00"
        },
        {
            "name": "beta.txt",
            "path": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\find-files\\nested\\beta.txt",
            "relative_path": "nested\\beta.txt",
            "depth": 1,
            "size_bytes": 6,
            "size_readable": "6.00 B",
            "modified_timestamp": 1789069884.0000687,
            "modified_at": "2026-09-10T14:51:24-05:00"
        }
    ],
    "meta": {
        "command": "findFiles",
        "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": 4.066,
        "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
        },
        "count": [],
        "details": [],
        "error": [],
        "error_code": [],
        "filters": {
            "type": "object",
            "properties": {
                "min_size_bytes": [],
                "max_size_bytes": [],
                "modified_after": [],
                "modified_before": [],
                "exclude": [],
                "exclude_dirs": []
            },
            "additionalProperties": true
        },
        "limit": [],
        "matched_count": [],
        "matched_size_bytes": [],
        "matched_size_readable": [],
        "pattern": [],
        "recursive": [],
        "results": [],
        "search_path": [],
        "skipped_unreadable": [],
        "sort": {
            "type": "object",
            "properties": {
                "by": [],
                "descending": []
            },
            "additionalProperties": true
        },
        "total_size_bytes": [],
        "total_size_readable": [],
        "truncated": [],
        "warnings": []
    },
    "additionalProperties": true
}

错误与限制

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

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

{
    "success": false,
    "message": "Search directory does not exist: C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\missing-golden-core-path",
    "error": "Search directory does not exist: C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\missing-golden-core-path",
    "error_code": "path_not_found",
    "details": {
        "search_path": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\missing-golden-core-path"
    },
    "meta": {
        "command": "findFiles",
        "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": 2.802,
        "schema_version": 1
    }
}

捕获的命令: qzx findFiles ../artifacts/qzx-evidence/missing-golden-core-path "*.txt" -r --json

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

证据与来源

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

实用指南

了解 qzx findFiles 适用于哪些任务、与原生工具相比如何,以及自动化时应关注哪些细节。

继续探索

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

浏览所有 QZX 命令