tldr/pages/common/7z.md

28 lines
518 B
Markdown
Raw Normal View History

2016-02-22 21:50:05 +00:00
# 7z
> A file archiver with high compression ratio.
- Archive a file or folder:
2016-02-22 21:50:05 +00:00
2016-08-18 10:50:36 +01:00
`7z a {{archived.7z}} {{path/to/file}}`
2016-02-22 21:50:05 +00:00
- Extract an existing 7z file with original directory structure:
2016-02-22 21:50:05 +00:00
2016-08-18 10:50:36 +01:00
`7z x {{archived}}`
2016-02-22 21:50:05 +00:00
2018-01-18 03:41:05 +00:00
- Extract an archive with user-defined output path:
`7z x {{archived}} -o{{path/to/output}}`
- Archive using a specific archive type:
2016-02-22 21:50:05 +00:00
2017-06-15 12:21:34 +01:00
`7z a -t {{zip|gzip|bzip2|tar|...}} {{archived}} {{path/to/file}}`
- List available archive types:
`7z i`
2016-02-22 21:50:05 +00:00
- List the contents of an archive file:
2016-02-22 21:50:05 +00:00
2016-08-18 10:50:36 +01:00
`7z l {{archived}}`