Linux tar can improve the ease of use performance. Next we will talk about Linux tar compression. The basic Linux operation aims to give readers a preliminary understanding of Linux. It involves file management, disk management, user and group management, man help, software package management, File compression, and printer management. For those who are new to Linux, they will surely get dizzy with a bunch of various file names under Linux tar.
Analysis of compressed files in Linux tar
For example, we know that there are only two common types of compressed files in Windows: zip and. rap. However, the Linux kernel can also be used in Linux TARS, and there are too few users who use .zipand .rar in linux. This article will summarize these common compressed files. I hope you will not be confused when you encounter these files next time.
Before summarizing various types of compressed files, we should first clarify two concepts: Packaging and compression. Packaging refers to converting a large number of files or directories into a total file. Compression refers to converting a large file into a small file through some compression algorithms. Why do we need to differentiate these two concepts? In fact, this is because many Linux compression programs can only compress one file, so when you want to compress a large number of files, you have to use another tool to compress these files into a package and then compress the original compression program.
In Linux, the most commonly used package program is Linux tarts. The package we use with the tarprogram is often called a tarpackage, and the command of the tarpackage file is always ended with a tar. After the tar package is generated, you can use other programs to compress it. So let's first talk about the basic usage of the tar command:
There are many options for the Linux tar command (which can be viewed using man tar), but there are several commonly used options. The following is an example:
# Tar-cf all.tar *. jpg
This command is to pack all. jpg files into a package named all.tar. -C indicates that a new package is generated.-f specifies the package file name.
# Tar-rf all.tar *. gif
This command adds all .gif files to the package of all.tar. -R indicates adding files.
# Tar-uf all.tar logo.gif
This command is used to update the logo.gif file in tarbao all.tar.-u indicates that the file is updated.
# Tar-tf all.tar
This command is used to list all files in the all.tar package.-t is used to list objects.
# Tar-xf all.tar
This command is used to extract all the files in the all.tar package.
The above is the most basic usage of Linux tar. To help you compress or decompress files while packing and unpackage, Linux tar provides a special feature. This means that Linux tar can call other compression programs, such as gzip and bzip2, while packaging or unpacking.
- Command Daquan: Linux crond Parsing
- How to install realplayer in Linux
- Analyze svn commands from Linux
- Linux memory management methods
- Parsing Linux OS modification time