1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/7z.md
Marco Bonelli f79f6011e0 Refactor: add missing or_directory where needed.
This commit adds the missing `_or_directory` to any example which is
specifying an action affecting a file or a directory, but uses the
token `{{path/to/file}}` instead of `{{path/to/file_or_directory}}`.
2019-02-08 19:43:24 +00:00

706 B

7z

A file archiver with high compression ratio. Homepage: https://www.7-zip.org/.

  • Archive a file or directory:

7z a {{archived.7z}} {{path/to/file_or_directory}}

  • Encrypt an existing archive (including headers):

7z a {{encrypted.7z}} -p{{password}} -mhe {{archived.7z}}

  • Extract an existing 7z file with original directory structure:

7z x {{archived.7z}}

  • Extract an archive with user-defined output path:

7z x {{archived.7z}} -o{{path/to/output}}

  • Archive using a specific archive type:

7z a -t {{zip|gzip|bzip2|tar}} {{archived.7z}} {{path/to/file_or_directory}}

  • List available archive types:

7z i

  • List the contents of an archive file:

7z l {{archived.7z}}