The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
spam and protection? Bashar Security 10 02-11-2007 11:33 AM
File password protection/encryption rdudejr AIX 2 07-09-2006 06:43 PM
Protection code of file/directory zp523444 UNIX for Advanced & Expert Users 3 12-12-2005 10:24 PM
Does unix has password protection for zip files? p_prathaban UNIX for Advanced & Expert Users 6 02-19-2004 09:46 AM
protection schemes mattyboy Filesystems, Disks and Memory 4 01-13-2004 09:44 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-20-2008
Registered User
 

Join Date: Aug 2008
Posts: 2
Syntaxt to zip a file with password protection

Hi Experts,

I am an SAP ABAP developer and compleatly stranger to unix and I need a help to extend a small peice of code.

Our requirement is to zip a file with password protection in a specified directory. Following is the code I am using to zip a file ZZZZ.TXT.

Here YYYY = is the path where the file is stored.
ZZZZ is the name of the file.

cd /YYYY;zip -r ZZZZ.zip ZZZZ.TXT

Please let me know the syntax to create the zip file with password protection. I saw some where that we can use "-P password" to make the zipfile password protected, but I am not sure where/how exactly it can be used within the above syntax. Although -P is not safe, it is OK with us, as we are triggering this command from SAP.

This is quite urgent for us.

Thanks in advance.
Veerendranath Maddula.


Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-20-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
Code:
cd /YYYY; zip -P password -r ZZZZ.zip ZZZZ.TXT

Last edited by era; 08-21-2008 at 12:01 AM.. Reason: Don't look now, but all your text is green!
Reply With Quote
  #3 (permalink)  
Old 08-21-2008
Registered User
 

Join Date: Aug 2008
Posts: 2
Thanks for your reply, but this code is not working for me when I am triggering this command from SAP, is there any other way we can write this code .?

Thanks,
Veerendranath
Reply With Quote
  #4 (permalink)  
Old 08-21-2008
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 996
Be aware that many precompiled versions of zip do not include the encryption capability. You may need to compile and install your own version with the encryption options included. You can check whether it has encryption support by examing the 'special compilation options' in the output of zip -v.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Bookmarks

Tags
password, zip

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:




All times are GMT -4. The time now is 07:49 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66