I would like to know whether it is possible to do the following via CLI.
I have a Folder
F which contains several sub folders and some files. I want to compress folder
.zip file with the "password-only-extract".
Go to the relevant folder using the
(If your folder
Then, type in your terminal:
This will prompt you for a password. Give it, and that will create a password-protected zip file from that folder.
There is an option called
The encryption of zip files is weak and can be broken very easily. Instead use 7zip.
This has the problem that the password can be stored in the command history and while it's being compressed it could be sniffed from the process arguments. The first can be addressed, the later can't.