To compress files:
$ tar -czvf 〈archive-name〉.tar.gz 〈list-of-files-and-dirs〉
Compression options: z
- gzip, j
- bzip2, J
- xz.
Multi-thread compress:
$ tar -c 〈directory〉/ | pigz > 〈directory〉.tar.gz
$ tar -xf 〈archive〉.tar.gz
$ tar -tf 〈archive〉.tar.gz
$ unzip -l 〈archive〉.zip
$ tar -xf 〈archive〉.tar.gz 〈path/to/a/specific/file〉
$ unzip -p 〈archive〉.zip 〈path/to/a/specific/file〉 > file
To create a password protected 7z
-archive with encrypted file list
$ 7z a -p -mhe=on 〈archive〉.7z 〈list-of-files-and-dirs〉