Comments on: How to Create a Password Protected ZIP File in Linux https://www.tecmint.com/create-password-protected-zip-file-in-linux/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Mon, 14 Aug 2023 23:39:27 +0000 hourly 1 By: gvisoc https://www.tecmint.com/create-password-protected-zip-file-in-linux/comment-page-1/#comment-2045414 Mon, 14 Aug 2023 23:39:27 +0000 https://www.tecmint.com/?p=28207#comment-2045414 The example:

# 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.

]]>
By: Ravi Saive https://www.tecmint.com/create-password-protected-zip-file-in-linux/comment-page-1/#comment-1923760 Sat, 03 Dec 2022 08:02:58 +0000 https://www.tecmint.com/?p=28207#comment-1923760 In reply to Jirka.

@Jirka,

Thanks for sharing the tip, hope it will help other Linux users…

]]>
By: Jirka https://www.tecmint.com/create-password-protected-zip-file-in-linux/comment-page-1/#comment-1923467 Fri, 02 Dec 2022 15:07:25 +0000 https://www.tecmint.com/?p=28207#comment-1923467 This worked by me in Ubuntu: zip --encrypt 2022-12-02_backup.zip -r folder_to_backup.

Be good!

]]>
By: Ivan https://www.tecmint.com/create-password-protected-zip-file-in-linux/comment-page-1/#comment-1886116 Mon, 26 Sep 2022 23:49:15 +0000 https://www.tecmint.com/?p=28207#comment-1886116 It is not worked! work this: zip -P asdasdas archive.zip asdasdas.

]]>
By: doug https://www.tecmint.com/create-password-protected-zip-file-in-linux/comment-page-1/#comment-1414887 Wed, 13 Jan 2021 17:55:32 +0000 https://www.tecmint.com/?p=28207#comment-1414887 Like others have said, needs to be recursive or a wildcard in the example you give.

]]>