Linux decompressed file

xiaoxiao2021-03-06  15

For those who have just contacted Linux, they will give fun of all a lot of various files next to Linux. Don't say, just as an example of compressed files, we know that only two of the most common compressed files under Windows, one, ZIP, the other is .rap. However, Linux is different, it has .gz, .tar.gz, TGZ, BZ2, .z, .tar and many other compressed file names, and .zip and .rar under Windows can also be used under Linux, but Too few people using .zip and .rar. This article comes with these common compressed files. I hope that when you encounter these files next time, you will not be dizzy before you have a specific summary of all kinds of compressed files. First, we must figure out two concepts: packaging and compression. Package refers to a total file to become a total file, compress a large file into a small file through some compression algorithms. Why do you distinguish these two concepts? In fact, there are only many compressed programs in Linux, which can only be compressed for a file, so when you want to compress a lot of files, you have to first take this big pile of documents to a package first. Then, then compress the original compression program. The most commonly used packaging programs under Linux is Tar. The package that uses the TAR program we often referred to as a TAR package, the command of the TAR package file is usually ended in .tar. After generating a TAR package, you can use other programs to compress, so let's talk about the basic usage of TAR commands: TAR commands have a lot (you can see it), but there are several Options, here to illustrate: # tar -cf all.tar * .jpg This command is to packet all .jpg's files into a package called all.tar. -c is a file name that represents a new package, -f specified package. # Tar -rf all.tar * .gif This command is to add all the .gif's files to all. Tar's bag. -r is the meaning of increasing files. # TAR -UF all.tar logo.gif This command is an update original TAR package all.tar logo.gif file, -u is the meaning of the update file. # tar -tf all.tar This command is to list all files in all.tar packages, -t is the meaning of the file. # tar -xf all.tar This command is all files in the all.tar package, -t is the meaning of unlocking is the most basic usage of Tar. In order to facilitate the user to compress or decompress files while packing unpacking, TAR provides a special feature. This is that TAR can call other compression programs while packaging or unpacking, such as calling Gzip, Bzip2, etc. 1) TAR call GZIP Gzip is a compression program developed by the GNU organization. The file ended at .GZ is the result of Gzip compression. The decompression program with Gzip is gunzip. Use the -z parameter in TAR to call Gzip. Below to exemplify: # tar -czf all.tar.gz * .jpg This command is a TAR package to put all .jpg files, and compress it with Gzip, generate a Gzip compressed package, package This command is open from the top of the above. 2) TAR call BZIP2 BZIP2 is a more compressed compression program, and the file ending ends is the result of BZIP2 compression. The decompression program with BZIP2 is bunzip2. Use the -j this parameter in TAR to call GZIP.

Below to exemplish: # tar -cjf all.tar.bz2 * .jpg This command is a TAR package that puts all .jpg's files, and compresses it with BZIP2, generates a BZIP2 compressed package, package This command is open from the top of the above. The command is called all.tar.bz2 # tar -xjf all.tar.bz2. 3) TAR calls Compress Compress is also a compressed program, but it is not as much as those who use COMPRESS. The file ended in. Z is the result of BZIP2 compression. The decompression program with Compress is uncompress. Use the -z parameter in TAR to call Gzip. Below to exemplify: # tar -czf all.tar.z * .jpg This command is a TAR package that puts all .jpg files, and compresses it with Compress, generates a Uncompress compressed package, package This command named all.tar.z # tar -xzf all.tar.z has the above knowledge generated above, and you should be able to unwave a variety of compressed files, below for TAR series compression Document makes a summary: 1) Document Tar -xf all.tar 2 for .tar ends for .gz Gzip -d all.gz gunzip all.gz 3) Files ending for .tgz or .tar.gz Tar -xzf all.tar.gz Tar -xzf all.tgz 4) For file bzip2 -d all.bz2 bunzip2 all.bz2 5 on .bz2 end.bz2 5) Document Tar -xjf all.tar.bz2 6 for tar.bz2 ) For file uncompress all.z 7 ended in .z.) For file Tar -Xzf all.tar.z ending the .tar.z, there is also a corresponding method for the common compressed files .zip and .rar, linux. They: 1) Provide ZIP and Unzip programs for .zip Linux, ZIP is a compressed program, Unzip is a decompression program. Their parameter options are a lot, here is only a brief introduction, still explaining the usage: # zip all.zip * .jpg This command is compressed into all .jpg files into a zip package # unzip all.zip This command It is to extract all the files in all.zip 2) For .rar files to process .rar files under Linux, you need to install Rar for Linux, you can download it from the Internet, but remember, Rar for Linux is not free; Http://www.rarsoft.com/download.htm Download Rar for Linux 3.2.0, then install: # tar -xzpvf rarlinux-3.2.0.tar.gz # cd rar # Make This is installed, after installation There are two programs of RAR and UnRar, and RAR is a compression program. UnRar is a decompression program. Their parameter options are available here. Here is a brief introduction, and it is still an example of its usage: # RAR a all * .jpg This command is compressed into a RAR package, named all.rar, the program Will automatically attach the .rar extension.

转载请注明原文地址:https://www.9cbs.com/read-46383.html

New Post(0)