zip (in linux) is a command-line utility that is used to compress files, the opposite of zip is unzip. Unzip is used to decompress zip files to their original state.
How to use zip
zip is used to compress multiple files
unzip is used to decompress those files
# zip syntax, options are optionalzip<OPTIONS><TOBEMADEZIPFILE><FILE1><FIL2>##### examples with zip, and parameterszip-e<toBeMadeZipFile><FILE1><FIL2># encrypt the fileszip-u<toBeMadeZipFile><FILE1><FIL2># update only changed or new fileszip-9<toBeMadeZipFile><FILE1><FIL2># compress betterzip-q<toBeMadeZipFile><FILE1><FIL2># no output will be generated in the terminalzip--help# shows all other options zip has to offer.# unzip syntax, options are optionalunzip<options><zipefile>##### examples with unzip, and parametersunzip-q<zipfile># decompress without any output generated in the terminalunzip-o<zipfile># overwrite files without promptingunzip-n<zipfile># never overwrite existing files.ls
zip and unzip examples
# Compress with ziproot@Corrosie:~/test/test#lshello.jpegtest1.txttest3.txtroot@Corrosie:~/test/test#ziptesttest1.txttest3.txthello.jpegadding:test1.txt (stored 0%)adding:test3.txt (stored 0%)adding:hello.jpeg (stored 0%)root@Corrosie:~/python3/test#lshello.jpegtest1.txttest3.txttest.ziproot@Corrosie:~/test/test## Decompress with unziproot@Corrosie:~/test/test#rm-rftest1.txthello.jpegtest3.txtroot@Corrosie:~/test/test#lstest.ziproot@Corrosie:~/test/test#unziptest.zipArchive:test.zipinflating:test1.txtextracting:test3.txtextracting:hello.jpegroot@Corrosie:~/test/test#lshello.jpegtest1.txttest3.txttest.zip