ZIp the files using password


I have some set of files and I want to zip the files using the Unix command: 'zip  <zip file name> <files name>'.But I want ot encrypt the zip file using password so that no other one will open the files.Is there any parameter in zip command so that i can keepa password also for that
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

did you try 'zip -e', resp. does your 'zip' support this?
If not, I would suggest using GNUpg
... for GnuPG please look here ...
Try using -e as in

zip -e <zipfiles>

From the man page :
Encrypt the contents of the zip archive using a password which is entered on the terminal in response to a prompt (this will not be echoed; if standard error is not a tty, zip will exit with an error). The password prompt is repeated to save the user from typing errors.

Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

try the -e option with zip command which will prompt you for password
Where security  is  truly  important,  use strong  encryption  such as Pretty Good Privacy instead of the relatively weak encryption provided by standard zipfile utilities.

soujiiAuthor Commented:

I have tried with this command in Unix.But it is giving this elow error.
$ zip -e test.txt

zip error: Invalid command arguments (encryption not supported)

zip test.txt
crypt mypassword < >

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
If you want to still use zip then I am sure that you can download an "upgrade" which has encryption support built in.  I don't know your particular flavor of OS so I can't point you toward a link.  

At the very least, you can probably very easily compile the support in yourself but I know that someone else has already done it.
Hi again,

I'd really urge you to use GnuPG!

 You'll have strong encryption, and if you don't want to use the public/private asymmetric processing, there is a 'symmetric' option, too.

... and there is no problem compiling it on Solaris.


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.