Linux file compression and decompression commands:
Tar command (if packaged and compressed, the original file will also be present by default)
-C Set up a package file
-X Unpack the package
-T view the class capacity in the package
-R Append file to package
-V shows the packaging process
-F File
For example: Command parameter package name to package the file path
Tar cvf zzj.tar/ect/zzj//ect/ko
Tar xvf Zzj.tar (unpack package)
Tar Xvfz zzj.tar.gz (unzip to original compressed file)
Tar cvfz zzj.tar.gz/ect/zzj//ect/ko (packaged and compressed into gzip format)
Tar cvfj zzj.tar.bz2/ect/zzj//ect/ko (packaged and compressed into bzip2 format)
Tar xvfz zzj.tar.gz–c./KK (directory) can be extracted to the specified directory
(Zip gzip bzip2, compressed format, the original file does not exist by default)
bzip2 XX (If you add parameter-K to create the compressed package while saving the original file, plus the parameter-V will be compressed information displayed)
Bzip2–d xx.bz2 (plus parameter-D decompression)
Gzip allows you to extract files into a directory (and of course, compress, but is eliminated ...). )
GZIP–CD zeng.gz >/home/z01/desktop/zeng (new file)
Note: The parameter-D is the decompression parameter-C is the redirect
Specify the directory the last one must be the target file!
Summary: Tar command packaging compression, the original file default, GZIP,BZIP2 compression/decompression, the original file does not exist by default. Of course, you can add the corresponding parameters to make it exist simultaneously. Gzip–c bzip2–k can be. Gzip and tar can be implemented if you want to extract the compressed files to the specified directory.
Linux file compression and decompression commands