Compression tool: GZIP,BZIP2 compression capability is gradually enhanced
Package or compress tool: tar
Package and Compress tool: Zip compression capability is stronger than gzip and bzip2
The difference between the two types of compression tools is gzip and bzip2:
- Gzip and bzip2 can only compress files, zip files and directories can be compressed
- BZIP2 and gzip Use the same method, and compressed after the source file disappears, decompression after the compressed file disappears. bzip2 a feature bzcat, you can view the contents of the compressed file
bzip2 [file name] compressing a file
bzip2-d [compress filename] Unzip a compressed file
gzip [file name] Compress a file
gzip-d [compress filename] Unzip a compressed file
Bzcat [compress file name] To view the contents of a compressed file
Package or compress tool tar:
- Packaging capabilities for Tar
TAR-CVF [package to be generated] [directory name] [file name] Package directory and file
TAR-XVF [Package name] Unpacking
- Compression function of tar
TAR-ZCVF [Name of the package to be generated. tar.gz] [file name] [directory name]
------Package files and directories, and compress (compress in gzip)
TAR-JCVF [Name of the package to be generated. tar.bz2] [file name] [directory name]
------Package files and directories, and compress (compress in bzip2 mode)
TAR-ZCVF [Zip package name. tar.gz]--exclude [exclude packaged file or directory name] [file name] [directory name]
------Exclude the packaging of a file or directory and compress it in gzip
- TAR-TF [Package name] View all files in the package
Package and compress the tool Zip:
- Zip for packaging and compressing files or directories
Zip-r [package name to be generated] [file] [directory] package files and directories, and compress
- Unzip for unpacking compressed packets
Unzip [compress package name] Unzip the package
Tar and zip: The source file is preserved after compression, and the compressed file is retained after decompression.
The use of Linux packaging and compression tools