Table of Contents

Creating archives

Using zip

Use -e for encryption Use from -0 (none, archive only) to -9 (max) to set compression level

zip /home/<my_user>/<my_archive_name>.zip -r /folder/to/archive -e -9

Using 7zip

First verify that 7zip is installed

sudo apt-get install p7zip-full

Use letter a to create an archive To set compression level choose one of the following parameter:

7z a /home/<my_user>/<my_archive_name>.7z /folder/to/archive -mx9

Archiving and encrypting the files without compression:

7z a Images.7z Images/ -pMyPassword -mhe -mx0

Sources: IBM Developer Network, DotNetPerls