2016-01-05 01:02:34 +00:00
|
|
|
# 7za
|
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
> File archiver with a high compression ratio.
|
|
|
|
> Similar to `7z` except that it supports fewer file types but is cross-platform.
|
2023-05-18 12:43:32 +01:00
|
|
|
> More information: <https://manned.org/7za>.
|
2016-01-05 01:02:34 +00:00
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
- [a]rchive a file or directory:
|
2016-01-05 01:02:34 +00:00
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
`7za a {{path/to/archive.7z}} {{path/to/file_or_directory}}`
|
2016-01-05 01:02:34 +00:00
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
- Encrypt an existing archive (including file names):
|
2016-01-05 01:02:34 +00:00
|
|
|
|
2023-01-11 11:24:50 +00:00
|
|
|
`7za a {{path/to/encrypted.7z}} -p{{password}} -mhe={{on}} {{path/to/archive.7z}}`
|
2016-01-05 01:02:34 +00:00
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
- E[x]tract an archive preserving the original directory structure:
|
2016-01-05 01:02:34 +00:00
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
`7za x {{path/to/archive.7z}}`
|
2016-02-23 01:00:13 +00:00
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
- E[x]tract an archive to a specific directory:
|
2016-02-23 01:00:13 +00:00
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
`7za 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
|
|
|
|
|
|
|
`7za x {{path/to/archive.7z}} -so`
|
|
|
|
|
|
|
|
- [a]rchive using a specific archive type:
|
2016-01-05 01:02:34 +00:00
|
|
|
|
2023-01-11 11:24:50 +00:00
|
|
|
`7za a -t{{7z|bzip2|gzip|lzip|tar|...}} {{path/to/archive.7z}} {{path/to/file_or_directory}}`
|
2016-01-05 01:02:34 +00:00
|
|
|
|
2021-05-01 19:10:54 +01:00
|
|
|
- [l]ist the contents of an archive:
|
|
|
|
|
|
|
|
`7za l {{path/to/archive.7z}}`
|
|
|
|
|
|
|
|
- List available archive types:
|
|
|
|
|
|
|
|
`7za i`
|