File compression - markhowellsmead/helpers GitHub Wiki

Compress

GZIP+TAR

COPYFILE_DISABLE=1 is important, so that hidden and .files aren't included in the archive file.

COPYFILE_DISABLE=1 tar -zcvf tar-archive-name.tar.gz source-folder-name

ZIP

find ./myFolder -path '*/.*' -prune -o -type f -print | zip files.zip -@

Expand

ZIP

unzip file.zip

TAR

tar -xvf file.tar

GZIP

gzip -d file.gz

TAR

tar -xvzf file.tgz

GZIP+TAR

tar xfvz file.tar.gz