Compress bz2, XZ, zip, Z
The directory cannot be compressed and the original file is deleted by default after compression.
Gz:gzip/path/filename
-D Decompression
Gunzip/paht/some_filename
Zcat/path/somefile.gz: View the contents of the text file under the condition of no pressure.
BZIP2: There is a greater compression ratio than gzip.
Bzip2/path/some_filename
-D Decompression
-K Keep the original file
Bunzip2/path/some_filename
bzcat/path/somefile.bz2
Xz:xz/path/some_filename
-D Decompression
-K Keep the original file
Unxz
Xzcat
Zip: Can compress the directory, compressed after the default does not delete the original file
Zip Filename.zip FILE1 FILE2
Unzip Filenam.zip
Archive: Archive, consolidate multiple files into 1 files, the archive itself does not mean that the compression
The traditional method of compressing Linux
Command compress:filename.z
Ucompress
Tar: Archive tool. Tar
-C Create an archive file
-F Filename.tar Archive files that need to be manipulated
TAR-CF File.tar file*
-X Expand Archive
--xattrs Preserve extended attribute information for files while archiving
-T does not expand the archive to see which files are archived
-ZCF Archive and invoke gzip compression
-ZXF Expand Archive and invoke gzip decompression, where z can be omitted
-JCF bzip2
-jxf
-JCF XZ
-jxf
Cpio: Archive tool, older than tar
Read Variable 1 ...
Enter space as a delimiter, such as the number of variables is greater than the input, the following variable value is empty,
The number of variables is less than input, and all subsequent inputs are assigned to the last variable
-P "Dfjlfjs" prompt
Compression, archiving under Linux