Examples (8)
[a]dd a file or directory to a new or existing archive
7z a path/to/archive.7z path/to/file_or_directoryEncrypt an existing archive (including filenames)
7z a path/to/encrypted.7z -ppassword -mhe=on path/to/archive.7z[a]rchive using a specific archive type
7z a -t7z|bzip2|gzip|lzip|tar|zip path/to/archive path/to/file_or_directory[l]ist the contents of an archive
7z l path/to/archive.7zSet the level of compression (higher means more compression, but slower)
7z a path/to/archive.7z -mx=0|1|3|5|7|9 path/to/file_or_directorymade by @shridhargupta | data from tldr-pages