2016-02-22 21:50:45 +00:00
|
|
|
# 7zr
|
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
> File archiver with a high compression ratio.
|
2024-03-14 05:01:06 +00:00
|
|
|
> Similar to `7z` except that it only supports 7z files.
|
2023-05-18 12:43:32 +01:00
|
|
|
> More information: <https://manned.org/7zr>.
|
2016-02-22 21:50:45 +00:00
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
- [a]rchive a file or directory:
|
2016-02-22 21:50:45 +00:00
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
`7zr a {{path/to/archive.7z}} {{path/to/file_or_directory}}`
|
2016-02-22 21:50:45 +00:00
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
- Encrypt an existing archive (including file names):
|
2016-02-22 21:50:45 +00:00
|
|
|
|
2023-05-18 00:59:33 +01:00
|
|
|
`7zr a {{path/to/encrypted.7z}} -p{{password}} -mhe={{on}} {{path/to/archive.7z}}`
|
2016-02-22 21:50:45 +00:00
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
- E[x]tract an archive preserving the original directory structure:
|
2016-02-22 21:50:45 +00:00
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
`7zr x {{path/to/archive.7z}}`
|
|
|
|
|
|
|
|
- E[x]tract an archive to a specific directory:
|
|
|
|
|
|
|
|
`7zr x {{path/to/archive.7z}} -o{{path/to/output}}`
|
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- E[x]tract an archive to `stdout`:
|
2021-05-01 19:10:54 +01:00
|
|
|
|
|
|
|
`7zr x {{path/to/archive.7z}} -so`
|
|
|
|
|
|
|
|
- [l]ist the contents of an archive:
|
|
|
|
|
|
|
|
`7zr l {{path/to/archive.7z}}`
|
|
|
|
|
2023-11-29 20:31:42 +00:00
|
|
|
- Set the level of compression (higher means more compression, but slower):
|
2021-05-01 19:10:54 +01:00
|
|
|
|
2023-11-29 20:31:42 +00:00
|
|
|
`7zr a {{path/to/archive.7z}} -mx={{0|1|3|5|7|9}} {{path/to/file_or_directory}}`
|