1.gzip--Compression and decompression
Usage: gzip [options] ... [File name] ...//file after decompression for. GZ End
Option:-D Decompression
2.bzip2--Compression and decompression
Usage: gzip [options] ... [File name] ...//file after decompression for. BZ2 End of
Option:-D Decompression
Note: The gzip and bzip2 tools cannot be packaged to compress the directory.
3.tar--Archiving and compression
Common options for the tar tool:
-C: Create an archive
- -delete: Deleting files from packaged files
- R: Chasing files to packaged documents
-X: Release Archive
-F: Specify the Archive file name
-Z,-J,-j (uppercase): Call the. GZ,. bz2,. xz Format tools for processing
--remove-files: Deleting source files after packaging
-T: Displays a list of files in the archive
-P (uppercase): Keep the absolute path to the file within the archive
-C (UPPERCASE): Specifies where the TAR package is disposed
Backup and Recovery:
Use tar-c ... Command---Make archive compression packages:
-TAR-ZCF backup files. tar.gz The document that was backed up:
-TAR-JCF backup files. tar.bz2 The document that was backed up:
-TAR-JCF backup files. Tar.xz The document that was backed up:
To view archive Compressed packages:
-TAR-TF Backup Files
Release Archive Compressed Package:
- TAR-XF backup file [-C target directory]
Linux compression and decompression