Zip with Password

view story

http://www.unix.com – Hi, In my shell script I am using the zip command to zip the log files. The zip file is password protected. But there is a dicey. I want the output as: 1) All files should be zipped including sub-directories' files 2) All files (individually) should be Password protected (may be common or different) 3) User should feed the password as input just once. Condition 1 is met. But in Condition2 the sub-directory files are not password protected.Rather the sub-directory is password protected. I used zip -r -9 -m -P password file_name.zip * Here password I handled in variable (condition 3) (HowTos)