compression format for tar, its compression rate and gzip similar, but also not widely used.
The common format is tar.gz and tar.bz2. If you want to compress quickly, then use gzip. If the file size is more important, use tar.bz2.
What is the tar command for?
Here are some common scenarios for using the TAR command
TAR-C: Build Compressed Archives-x: Unzip-T: View Content-r: Append files to the end of the compressed archive-u: Update the files in the original package this five is a separate command, the compression decompression will use one, can be used with other commands but only one of them. The following parameters are optional when compressing or extracting files as needed. -Z:-j with gzip properties:-Z with bz2
The tar command in Linux
The TAR (tape archive) command is a command that is often used in Linux systems to deposit files into an archive file.
The common file extensions include:. tar.gz and. tar.bz2, respectively, to express the further compression through the GZIP or bz
Through SSH access to the server, will inevitably use compression, decompression, packaging, unpacking, etc., this time the tar command is an essential tool for a powerful. The most popular tar in Linux is the perfectly formed, the most powerful. The TAR command creates arch
When pulling logs today, I suddenly found several logs to be pulled, so I began to package the logs.
Ls app-gateway.log.1 {4 .. 8} [the log to be intercepted is these]
App-gateway.log.14 app-gateway.log.15 app-gateway.log.16 app-gateway.log.17
Tar-czvf app-gateway.log.1.0809.tar.gz app-gateway.log.1 {4 .. 8}[Use tar command to compress]
App-gateway.log.14App-gate
Tar instructions for Aix1. Pack all. jpg files into a package named all.tar: tar-CF all.tar *. jpg;-C indicates that a new package is generated, and-F specifies the package file name.Add all .gif files to the package of all.tar: tar-RF all.tar *. gif;-r indicates adding files.
Update the original logo.gif file in tarbao all.tar:
This article was sponsored by Xiuyi linfeng and first launched in the dark world.
The tar command is generally used for packaging and decompression. You can view the help documentation as follows:
Tar-help
Man tar
Tar has the following important parameters:
-C. Crea
The-c parameter of the TAR command$ TAR-CVF File2.tar/home/usr2/file2Tar:removing leading '/' from the Members namesHome/usr2/file2This command can package the/home/usr2/file2 file into the File2.tar in the current directory, note
I. Introduction of use 1, noun distinctionPackage: Make a whole bunch of files or directories into a total file "tar command"Compression: Convert a large file into a small file "gzip,bzip2" through some compression algorithmsMany of the compressors in Linux can only be compressed for one file, so when you want to compress a lot of files, you have to make the whole bunch of files into a package (
This article was transferred from: http://www.cnblogs.com/li-hao/archive/2011/10/03/2198480.htmlExtractSyntax: tar [main option + Secondary options] file or directoryWhen using this command, the main option is required, and it tells Tar what to do, auxiliary options are auxiliary and can be used.Main options:C Create a new profile. Select this option if the user
ExtractSyntax: tar [main option + Secondary options] file or directoryWhen using this command, the main option is required, and it tells Tar what to do, auxiliary options are auxiliary and can be used.Main options:C Create a new profile. Select this option if the user wants to back up a directory or some files. Equivalent to packaging.X release the file from the
ExtractSyntax: tar [main option + Secondary options] file or directoryWhen using this command, the main option is required, and it tells Tar what to do, auxiliary options are auxiliary and can be used.Main options:C Create a new profile. Select this option if the user wants to back up a directory or some files. Equivalent to packaging.X release the file from the
Syntax: tar [main option + Secondary options] file or directoryWhen using this command, the main option is required, and it tells Tar what to do, auxiliary options are auxiliary and can be used.Main options:C Create a new profile. Select this option if the user wants to back up a directory or some files. Equivalent to packaging.X release the file from the archive
For Linux Packaging commands mdash; tar in windows, there are many compression software, such as winrar and winzip. you can package a folder. In Linux, there are two main compression commands: gzip and bzip2. the latter has a high level of compression. Players who are familiar with these two commands know that they once played the Linux Packaging command-
structure, you can perform more complex operations. For example, you can copy only files that have been modified after a specific time: $ tar CF---newer 20090101./etc | (cd/backup; tar XF-). This command creates a copy of the file that was modified after January 1, 2009. by using with rsh or SSH, you can also sync files to a remote host: $
ExtractSyntax: tar [main option + Secondary options] file or directoryWhen using this command, the main option is required, and it tells Tar what to do, auxiliary options are auxiliary and can be used.Main options:C Create a new profile. Select this option if the user wants to back up a directory or some files. Equivalent to packaging.X release the file from the
Go to: http://www.cnblogs.com/li-hao/archive/2011/10/03/2198480.htmlExtractSyntax: tar [main option + Secondary options] file or directoryWhen using this command, the main option is required, and it tells Tar what to do, auxiliary options are auxiliary and can be used.Main options:C Create a new profile. Select this option if the user wants to back up a directory
One: TarExtractSyntax: tar [main option + Secondary options] file or directoryWhen using this command, the main option is required, and it tells Tar what to do, auxiliary options are auxiliary and can be used.Main options:C Create a new profile. Select this option if the user wants to back up a directory or some files. Equivalent to packaging.X release the file f
ExtractSyntax: tar [main option + Secondary options] file or directoryWhen using this command, the main option is required, and it tells Tar what to do, auxiliary options are auxiliary and can be used.Main options:C Create a new profile. Select this option if the user wants to back up a directory or some files. Equivalent to packaging.X release the file from the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.