2015/04/24

How to zip unzip directory in Linux ?

Pack:
tar -zcvf archive.tar.gz directory/

c - create an archive from files in directory (recursive by default)
z - compress above archive with gzip
f - store the output as a file
v - list all the files

Unpack:
tar -zxvf archive.tar.gz