Password protect a zip file


Sometime a simple encrypt with a password is needed. This isn't the most secure method (7z provides more secure methods), but is better than nothing. I simple way to do it is to create a zip password protected with all the files.

zip --password yourpassword filename.zip file.doc file1.doc file2.doc  

Often it's easier to just zip a whole directory.

zip --password yourpassword -r filename.zip files-to-be-zipped/