Tar & Zip

zip

1
2
3
4
5
6
7
https://unix.stackexchange.com/questions/46969/compress-a-folder-with-tar
To tar and gzip a folder, the syntax is:
tar czf name_of_archive_file.tar.gz name_of_directory_to_tar

tar -zcvf xxx.tar.gz aaa bbb
tar -jcvf xxx.tar.bz2 aaa bbb
tar -Jcvf xxx.tar.xz aaa bbb

unzip

1
2
3
4
5
tar -xf xxx.tar.gz
tar -xf xxx.tar.bz2
tar -Jxf xxx.tar.xz

tar -xf xxx.tar.gz -C ./xxx