# zip -e ccat-command.zip ccat-1.1.0/
Does not work on a folder, as it only compresses the folder and not its content. Indeed, in the output of the example we can get a hint of this fact based on the “(stored 0%)”, which means that the archive is compressed down to 0%, i.e., no actual content.
To compress a folder and its content, encrypted, we need to add -r:
# zip -e -r ccat-command.zip ccat-1.1.0/ or # zip -er ccat-command.zip ccat-1.1.0/
will work. We will notice it because we get a comprehensive output and a statement of how much deflation applied to each and every file.
]]>@Jirka,
Thanks for sharing the tip, hope it will help other Linux users…
]]>zip --encrypt 2022-12-02_backup.zip -r folder_to_backup
.
Be good!
]]>zip -P asdasdas archive.zip asdasdas
.
]]>