only be compressed for one file, so that when you want to compress a lot of files, you have to first make a package (Tar command) of the whole bunch of files, and then compress the program (gzip bzip2 command).The most common packaging program under Linux is tar, which is o
due to the many compression programs in Linux that can only be compressed for one file, so that when you want to compress a lot of files, you have to first make a package (Tar command) of the whole bunch of files, and then compress the program (gzip bzip2 command).The most common packaging program under Linux is
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
): exechttp of the find command: // www.bkjia.com/ OS /201211/168901.htmllinuxcommand every day (21): xargshttp of the find command: // timeout (22 ): detailed description of the parameters of the find command: http://www.bkjia.com/ OS /201211/168912.htmla linuxcommand every day (23): Linux directory structure (24): Linux file type and extension (2 5): linux File
compression programs while packaging or unpacking,
For example, gzip and Bzip2 are called.1) tar calls GzipGzipis a program developed by gnuorganization. The file ending with .gz is the result of gzip compression.
The decompress program relative to gzip is gunzip. Use the-Z parameter in
can only be compressed for one file, so that when you want to compress a lot of files, you have to first make a package (Tar command) of the whole bunch of files, and then compress the program (gzip bzip2 command).The most common packaging program under Linux is tar, which
file2.txt
-p,–preserve-permissions,Retain the original file permissions when extracting filesCompress archive files, use BZIP and GZIP two waysParameters related to compression-J,–BZIP2,Compressing an archive using bzip2Example:?
1234567
[[emailprotected] TAR] # tar-jcf file.tar.bz file2.txt file1.txt [[emailprotected]
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:
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 whol
Tar command
Function descriptionTAR is an acronym for Tape archive, a frequently used archive tool under Linux, often seeing files with the file names ending in. tar and tgz, which are files that are archived with the normal TAR commands and files that are archived with gzip
There are two obvious benefits of reducing file size, one is to reduce storage space, and the other is to reduce transmission time when transferring files over the network. Gzip is a frequently used Linux system command to compress and decompress files, which is both convenient and useful. Gzip not only compresses large, less-used files to conserve disk space, bu
package,-T is to list the meaning of the file# TAR-XF All.tarThis command is to solve all the files in the All.tar package,-X is the meaningThese are the most basic uses of tar. In order to facilitate the user in the package unpacking can be compressed or decompressedFile, Tar provides a special feature. This is the
Reducing file size has two obvious benefits, one is to reduce storage space, and the other is to transfer files over the network, you can reduce the transmission time. Gzip is a regular use of Linux in the file compression and decompression of the command, both convenient and useful. Gzip can be used not only to compress large, less-used files to conserve disk sp
Tar command
[Root @ Linux ~] # Tar [-cxtzjvfppn] file and directory ....
Parameters:
-C: Create a parameter command for the compressed file );
-X: Unlock the parameter command of a compressed file!
-T: view the files in the tarfile!
Note that C/X/T can only exist under the
Original URL: http://www.cnblogs.com/peida/archive/2012/12/06/2804323.htmlThere are two obvious benefits of reducing file size, one is to reduce storage space, and the other is to reduce transmission time when transferring files over the network. Gzip is a frequently used Linux system command to compress and decompress files, which is both convenient and useful. Gzip
specify the standard output to the (-C option) specified location.Instance:Example 1: Single file compressiongzip A.txtExample 2: Compressing each individual file in the test directorygzip *Example 3: Unzip each compressed file in instance 2 and list the detailsGZIP-DV *Example 4: Detailed display of information for each compressed file in case of decompressionGzip-l *Example 5: Compress a tar backup file, at which time the zip file has the extension
Root @ Linux ~] #Tar [-cxtzjvfppn] file and directory ....Parameters:-C: Create a parameter command for the compressed file );-X: Unlock the parameter command of a compressed file!-T: view the files in the tarfile!Note that C/X/T can only exist under the parameter! Cannot exist at the same time!Because it is impossible to simultaneously compress and decompress.-Z
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
tar command
[Root@linux ~]# tar [-cxtzjvfppn] files and directories ....
Parameters:
-C: Create a compressed file parameter instruction (create meaning);
-x: Unlock a parameter command for a compressed file!
-T: View the files inside the Tarfile!
In particular, in the release of the parameters, c/x/t can only exist one
to archive a disk drive, when a floppy disk is full, the tar command reminds you to add a new floppy disk. In this way, you can save the tar file to several disks.
$ Tar CMF/dev/fd0/home
To restore the files on several disks, you only need to put the first disk into the soft drive, and then enter 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.