Typically one uses
tar to create an uncompressed archive and either
bzip2 to compress that archive. The corresponding
bunzip2 commands can be used to uncompress said archive, or you can just use flags on the
tar command to perform the uncompression.
If you are referring specifically to the Zip file format, you can simply use the
zip squash.zip file1 file2 file3
or to zip a directory
zip -r squash.zip dir1
this unzips it in your current working directory.
There are a truly vast number of different ways to compress and uncompress under UNIX derivatives so I’m going to assume you meant “zip” in the generic sense rather than a specific file format.
You can zip files up (in compressed format) with the GNU
tar -zcvf myfile.tgz .
which will do the current directory. Replace
. with other file names if you want something else.
To unzip that file, use:
tar -zxvf myfile.tgz
That’s assuming of course that you have a
tar capable of doing the compression as well as combining of files into one.
If not, you can just use
tar cvf followed by
gzip (again, if available) for compression and
gunzip followed by
For specific handling of ZIP format files, I would recommend downloading
7zip and using that – it recognises a huge variety of file formats, including the ZIP one.
If you don’t have zip and unzip packages installed and you have java, you can use
jar to unzip:
jar -xf file.zip