7z

File archiver with a high compression ratio. More information: <https://manned.org/7z>.

Install

All systems
curl cmd.cat/7z.sh
Debian Debian
apt-get install p7zip-full
Ubuntu
apt-get install p7zip-full
Arch Arch Linux
pacman -S p7zip-full
image/svg+xml Kali Linux
apt-get install p7zip-full
Fedora
dnf install p7zip-full
Windows (WSL2)
sudo apt-get update sudo apt-get install p7zip-full
Raspbian
apt-get install p7zip-full

File archiver with a high compression ratio. More information: <https://manned.org/7z>.

  • [a]dd a file or directory to a new or existing archive:
    7z a path/to/archive.7z path/to/file_or_directory
  • Encrypt an existing archive (including filenames):
    7z a path/to/encrypted.7z -ppassword -mhe=on path/to/archive.7z
  • E[x]tract an archive preserving the original directory structure:
    7z x path/to/archive.7z
  • E[x]tract an archive to a specific directory:
    7z x path/to/archive.7z -opath/to/output
  • E[x]tract an archive to `stdout`:
    7z x path/to/archive.7z -so
  • [a]rchive using a specific archive type:
    7z a -t7z|bzip2|gzip|lzip|tar|zip path/to/archive.7z path/to/file_or_directory
  • [l]ist the contents of an archive:
    7z l path/to/archive.7z
  • List available archive types:
    7z i

© tl;dr; authors and contributors