Zip one file
zip filename.zip file_to_compress
Zip multiple files
zip filename.zip file_to_compress1 file_to_compress2 file_to_compress3
Compression options
The compression level ranges from 0 to 9. Level 0 means no compression, 1 compress faster, and 9 compress better. The default is 6.
zip -9 filename.zip file_to_compress
Password protect zip archive
zip -P the_password filename.zip file_to_compress
To be prompted for password instead of specifying the password in the command line, use -e instead of -P.
zip -e filename.zip file_to_compress
Enter password:
Verify password:
Enter password:
Verify password:
Unzip files
unzip filename.zip
Unzip files with informations (verbose mode)
unzip -v filename.zip
List files that will be unzipped
unzip -l filename.zip
Test Files That Will Be Unzipped
unzip -t filename.zip