Compression format: gz,bz2,xz,zip,z
Compress:filename.z Early Compression commands
Uncompress
Gzip:. GZ can only compress files
Gzip/path/to/somefile: The source file is deleted when compression is complete
-D: Unzip
-#:1-9 specifies that the compression ratio is 6 by default;
Gunzip
Gunzip/path/to/somefile.gz: The original file will be deleted when the decompression is complete
Zcat/path/to/somefile.gz: In the case of no pressure, view the contents of the text file;
-
Bzip2: .bz2 can only compress files
Compression tool that is larger than gzip compression, uses a format similar to
bzip2 / Path/to/somefile: The source file
-k: Keep Compressed original file
        -#:1-9 specifies that the compression ratio is 6 by default;
bunzip2 unzip
bunzip2 /path/to/somefile.bz2
bcat/path/to/ somefile.bz2
XZ:. XZ can only compress files
Compression tool that is larger than gzip compression, uses a format similar to
Xz/path/to/somefile: The source file is deleted when compression is complete
-D: Unzip
-K: Keep Compressed original file
-#:1-9 specifies that the compression ratio is 6 by default;
UNXZ Decompression
Unxz/path/to/somefile.xz
Xzdec Decompression
Xzcat/path/to/somefile.xz
Zip: Compressible directory, compression by default does not delete the original file (both archived and compressed)
Zip filename.zip FILE1 FILE2 ...
Zip Test.zip test/*
Uzip: Unzip
Tar: Archive tool (archive not compressed)
-C: Create an archive file
-F: Specify the Archive file name
-X: Expand Archive file
--xattrs: Preserve extended properties of files when archiving
-T: Do not expand archiving to view archived files
-V: Show more information
-ZCF: Archive and invoke gzip compression
-ZXF: Call gzip to unzip and expand archive-Z option to omit (same as below)
-jcf:bzip2
-JXF:
-jcf:xz
-JXF:
Linux Essentials-compression, decompression commands