tldr/pages.zh/common/7z.md

32 lines
675 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 7z
> 一个高压缩率的文件归档器.
- 归档一个文件或文件夹:
`7z a {{归档文件.7z}} {文件路径}}`
- 对已存在的归档文件加密(包括头部):
`7z a {{加密文件.7z}} -p{{密码}} -mhe=on {{归档文件.7z}}`
- 提取一个已存在的7z文件并保持原来的目录结构:
`7z x {{归档文件.7z}}`
- 提取一个归档文件到自定义的输出目录:
`7z x {{归档文件.7z}} -o{{输出路径}}`
- 使用指定的类型来归档文件:
`7z a -t {{zip|gzip|bzip2|tar|...}} {{归档文件.7z}} {{文件路径}}`
- 列出可用的归档文件类型:
`7z i`
- 列出一个归档文件的内容:
`7z l {{归档文件.7z}}`