The commonly used compression commands are:
. zip. gz. bz2. tar.gz. tar.bz2
The. zip format can be interoperable in Linux and Windows:
Zip compressed filename Original file name: Compressed file.
Zip-r compressed Directory name Directory name: Compressed directory.
Unzip compressed file name: Extract files/directories.
gzip FileName: Compressed file, file format is. gz format automatically, and the original file disappears.
Gzip-r Original directory Name: Compressed directory, directory format, or source format, but files in the directory are compressed into. gz format.
gzip-d compressed file name: Extract files. or gunzip Compressed file name: Extract files.
Gzip-dr Zip directory Name: Unzip the directory. or Gunzip-r Compressed directory name: Unzip the directory.
bzip2 Original file name: Compressed file file format automatically for. bz2 format, and the original files disappear, bzip2 cannot compress the directory.
Bzip2-k Original file name: The compressed file file format is automatically in. bz2 format, and the original files are preserved, bzip2 cannot compress the directory.
bzip2-d compressed file name: Extract files. or bunzip2 Compressed file name: Extract files.
TAR-ZCVF compressed package name. tar.gz Original file: Compresses the original file into. tar.gz format, both directories and files can be compressed using the. tar.gz format.
TAR-ZXVF compressed package name. tar.gz: Unzip the package name. tar.gz.
TAR-JCVF compressed package name. tar.bz2 Original file: Compresses the original file into. tar.bz2 format, both directories and files can be compressed using the. tar.bz2 format.
TAR-JXVF compressed package name. TAR.BZ2: Unzip the package name. tar.bz2.
Since there are zip format why also use GZ and bz2 format, in fact, Windows also has a lot of compression format, different compression format and compression speed are different. Different formats in Linux have different scopes, so gz and bz2 formats
Linux Learning Private notes-Compressed Files command