Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

ZIp the files using password

Posted on 2008-11-07
9
Medium Priority
?
2,170 Views
Last Modified: 2013-12-27
Hi

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
0
Comment
Question by:soujii
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 22904816
Hi,
 
did you try 'zip -e', resp. does your 'zip' support this?
 
If not, I would suggest using GNUpg
 
wmp
 
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 22904840
... for GnuPG please look here ...
 
http://www.gnupg.org/features.en.html
 
 
0
 
LVL 8

Expert Comment

by:97WideGlide
ID: 22904872
Try using -e as in

zip -e <zipfiles>

From the man page :
-e
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.

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 40

Expert Comment

by:omarfarid
ID: 22904906
try the -e option with zip command which will prompt you for password

http://amath.colorado.edu/computing/software/man/zip.html
0
 
LVL 6

Expert Comment

by:peter991
ID: 22905189
Where security  is  truly  important,  use strong  encryption  such as Pretty Good Privacy instead of the relatively weak encryption provided by standard zipfile utilities.



0
 

Author Comment

by:soujii
ID: 22905849
Hi,

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

zip error: Invalid command arguments (encryption not supported)
0
 
LVL 40

Accepted Solution

by:
omarfarid earned 750 total points
ID: 22905971
try

zip test.txt
crypt mypassword < test.zip > test.zip.crypt

0
 
LVL 8

Expert Comment

by:97WideGlide
ID: 22906368
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.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 22913637
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.

wmp

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses
Course of the Month10 days, 7 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question