I. Compression and archiving
The compression algorithm is equivalent substitution
Gzip FILE1 FILE2 ... extension. gz -# (number): #代表压缩等级, 1-9, default 6 -D (compression): Extract -R: Recursive compression directory gunzip: decompressed command Zcat Viewable gzip Compressed files (no decompression required) bzip2-# (number): #代表压缩等级, 1-9, default 6 (better than gzip compression)-D (compression): Extract-K: after compression, Keep the original file Bunzip2bzcatxzunxzxzcat
Ii. Tar
File archiving, packaging can package multiple directories or files into a large file (relative path)
Tar:tape Archive Tape Archive
Tape, linear access, disk, random access
Cpio
The main option is required, and only one can be selected.
Tar [OPTION ...] File source file list (relative path) ...
Main option (the main option is required and only one can be selected.) ):
-C: Create an archive file
-X: Extracts the contents of the release archive (released to the working directory by default)
-r: Append new content to existing file
-U: Update the modified file to the archive file
-T: View the contents of the archive file
Accessibility Options:
-j: Compressing the archive file using the Bzip2 tool
-Z: Archive files are compressed with the GZIP tool
-F: Specify the name of the archive file
-M: Sub-volume Storage archive file
-C: Specifies the release path (directory) for the released file, rather than releasing it to the current directory. (If the target location has the same name file, directly overwrite)
-K: When releasing the file, if there is a file with the same name in the target directory, the file will not be released
--exclude: Not included, when releasing a file, exclude a file (a--exclude can only exclude one file, can be reused)
-V: Show archive process (normal)
-VV: Show more detail
To create an archive file:
Tar-CF Archive source file List Release archive: (Guaranteed F option and archive file next to) tar-xf file [-c/path/to/somedir] [file name in file]tar-tf file tar-CZ F file. GZ Note: Ensure that the F option and the archive file next to the TAR option "-" can be omitted without writing
"Linux compression archive, tar"