← 返回命令列表

Linux command

age-inspect 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Show metadata

age-inspect [secrets.age]

Read from stdin

cat [secrets.age] | age-inspect

Read from stdin

age-inspect - < [secrets.age]

Emit machine-readable JSON

age-inspect --json [secrets.age]

Print the version

age-inspect --version

说明

age-inspect reports metadata about a file produced by age(1) without performing any decryption. It parses the age header to identify the file format version, list the recipient stanza types used to wrap the file key (for example `X25519`, `scrypt`, `ssh-ed25519`, or the post-quantum `mlkem768x25519`), and report whether ASCII armor was used. When the input is a regular file (not a pipe) the tool also prints a size breakdown: header, armor overhead, encryption overhead and payload, so the size of the protected data can be estimated without supplying an identity. Because no key material is required, age-inspect is safe to run on files received from untrusted parties to determine which recipients can decrypt them, or to audit a directory of archived secrets. If _INPUT_ is omitted or set to `-`, the file is read from standard input.

参数

--json
Emit the inspection result as a JSON object suitable for programmatic processing (recipient types, post-quantum flag, armored flag, size fields).
--version
Print the age-inspect version and exit.

FAQ

What is the age-inspect command used for?

age-inspect reports metadata about a file produced by age(1) without performing any decryption. It parses the age header to identify the file format version, list the recipient stanza types used to wrap the file key (for example `X25519`, `scrypt`, `ssh-ed25519`, or the post-quantum `mlkem768x25519`), and report whether ASCII armor was used. When the input is a regular file (not a pipe) the tool also prints a size breakdown: header, armor overhead, encryption overhead and payload, so the size of the protected data can be estimated without supplying an identity. Because no key material is required, age-inspect is safe to run on files received from untrusted parties to determine which recipients can decrypt them, or to audit a directory of archived secrets. If _INPUT_ is omitted or set to `-`, the file is read from standard input.

How do I run a basic age-inspect example?

Run `age-inspect [secrets.age]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --json do in age-inspect?

Emit the inspection result as a JSON object suitable for programmatic processing (recipient types, post-quantum flag, armored flag, size fields).