2016-02-23 00:50:05 +03:00
|
|
|
# 7z
|
|
|
|
|
|
|
|
> A file archiver with high compression ratio.
|
|
|
|
|
2016-02-23 03:51:52 +03:00
|
|
|
- Archive a file or folder:
|
2016-02-23 00:50:05 +03:00
|
|
|
|
2016-08-18 12:50:36 +03:00
|
|
|
`7z a {{archived.7z}} {{path/to/file}}`
|
2016-02-23 00:50:05 +03:00
|
|
|
|
2018-02-06 21:25:26 +03:00
|
|
|
- Encrypt an existing archive (including headers):
|
|
|
|
|
|
|
|
`7z a {{encrypted.7z}} -p{{password}} -mhe {{archived.7z}}`
|
|
|
|
|
2016-02-23 03:51:52 +03:00
|
|
|
- Extract an existing 7z file with original directory structure:
|
2016-02-23 00:50:05 +03:00
|
|
|
|
2018-02-06 21:25:26 +03:00
|
|
|
`7z x {{archived.7z}}`
|
2016-02-23 00:50:05 +03:00
|
|
|
|
2018-01-18 06:41:05 +03:00
|
|
|
- Extract an archive with user-defined output path:
|
|
|
|
|
2018-02-06 21:25:26 +03:00
|
|
|
`7z x {{archived.7z}} -o{{path/to/output}}`
|
2018-01-18 06:41:05 +03:00
|
|
|
|
2016-02-23 03:51:52 +03:00
|
|
|
- Archive using a specific archive type:
|
2016-02-23 00:50:05 +03:00
|
|
|
|
2018-02-06 21:25:26 +03:00
|
|
|
`7z a -t {{zip|gzip|bzip2|tar|...}} {{archived.7z}} {{path/to/file}}`
|
2016-02-23 04:00:13 +03:00
|
|
|
|
|
|
|
- List available archive types:
|
|
|
|
|
|
|
|
`7z i`
|
2016-02-23 00:50:05 +03:00
|
|
|
|
2016-02-23 03:51:52 +03:00
|
|
|
- List the contents of an archive file:
|
2016-02-23 00:50:05 +03:00
|
|
|
|
2018-02-06 21:25:26 +03:00
|
|
|
`7z l {{archived.7z}}`
|