2 examples for 7z

{{ score }}
  # Unzip a 7z archive: x for extract
7z x archive.7z

# Unzip without directory structure: e for extract
7z e archive.7z

# Create a 7z archive: a for add
7z a archive.7z foo.c bar.h baz.h

# See what's in an archive: l for list
7z l archive.7z

# Update archive if files in current directory have changed: u for update
7z u archive.7z

# Remove files from archive: d for delete:
7z d archive.7z foo.c
        
{{ score }}
  # Make a encrypted 7z archive,-r is recursive. -mx = compression level choose between 0-9 -mx0 = fast, no compression -mx9 = slow, max compression. -mmt =cpu threads 3 is handy if you have 4 cores. -mhe = header encryption, it encrypts the filenames. -p is to set a password:
7z a -r -mx5 -mmt=3 -mhe=on -p ARCHIVE_NAME.7z folder_that_you_want_to_encrypt
# Same but with password "TH3PASSW0RD" on the command line (not recommended, it can go in the (bash) history):
z a -r -mx5 -mmt=3 -mhe=on -pTH3PASSW0RD ARCHIVE_NAME.7z folder_that_you_want_to_encrypt