The "preface" is explained in the blog post:This article will introduce through the personal tone of the Linux platform related compression and decompression command related knowledge, in the current time point "May 23, 2017 " under the grasp of the technical level is limited, there may be a lot of knowledge understanding is not deep enough or comprehensive, I hope you point out the problem of common exchange, In the follow-up work and study, if found that the content of this article and the act
Method: http://www.widlabs.com/article/mac-os-x-install-mysql-57-with-tar-gzMySQL:http://www.mysql.com/downloads/ , you'll see a "download" click under "MySQL Community Server" on the pageMySQL (GUI tool):https://dev.mysql.com/doc/workbench/en/wb-installing-mac.htmlIf you forget your password, force the modification:Step1:Stop MySQL ServiceStep2:Enter Terminal input: cd/usr/local/mysql/bin/Log in Administrator right after enter sudo suEnter the follow
files tar [option parameters] destination file is packaged fileTar-cv-f Test.tar Testa Testb 2. Unpack the package tar in 1 [option parameters] the unpacked packageTar-xv-f Test.tar #解压到当前目录tar-xv-f test.tar-c/tmp/mydir# unpacking test.dir into/tmp/mydir directory3. View the file name in the TAR packageTar-tv-f Te
compressed file is complete. -V displays the file name and compression ratio for each compressed and decompressed file. -Num uses the specified numeric num to adjust the compression speed.-1 or -- fast indicates the fastest compression method (low compression ratio), and-9 or -- best indicates the slowest compression method (high compression ratio ). The default value is 6.
Command instance:
Gzip * % compresses each file in the current directory into a. gz
: Back up all the files in the/etc/and save their permissions![Email protected] ~]# tar-czvpf/tmp/etc.tar.gz/etc# The properties of this-p are important, especially if you want to keep the properties of the original file!Example six: In/home, more than 2005/06/01 new files are backed up[Email protected] ~]# tar-n ' 2005/06/01 '-CZVF home.tar.gz/homeExample seven: I want to back up/home, etc, but don't/home/
We often encounter packages packaged in. gz format, which is not an executable automatic installation package, which is equivalent to a ZIP package, which is the process of manually extracting, editing, configuring environment variables. You can compress a GZ file by using the following command:Tar zxvf Parameter description:Z-to filter the gzip file, that is, only the specified
Linux Decompression Command Encyclopedia decompression tar bz2 zip tar.gz gz May 25, 2008 Sunday 04:57
Roughly summed up the Linux under the various formats of compression package compression, decompression methods. But some of the methods I did not use, also not all, I hope you help me to add, I will be ready to modify, thank you. To organize: A fish that can swimFrom: www.LinuxByte.netLast modi
are displayed for each compressed file: size of the compressed file, size of the uncompressed file, and compression ratio; name of the uncompressed file-r recursively searches for the specified directory and compresses all the files or decompress them. -T test to check whether the compressed file is complete. -V displays the file name and compression ratio for each compressed and decompressed file. -Num uses the specified numeric num to adjust the compression speed.-1 or -- fast indicates the f
of the unpacking:# TAR-XVF Archive_name.tar-c/tmp/extract_here/TAR. GZThis format is the most compressed format I have used. It does not take up too much CPU when compressing, and it can get a very ideal compression rate. Use the following format to compress a directory:# TAR-ZCVF archive_name.tar.gz directory_to_compressUnzip:#
1, first of all, we first say why there are three formats:(1) RAR format: RAR format is the first compression method, it is mainly used for the compression of some files of commercial organizations, it can be based on the requirements of different companies, to set up different compression algorithms, this algorithm is not public, security is relatively high, but he is charged.(2) Zip format: Because of the RAR format charges, will inevitably be born some free compression format, then zip is bor
Tar is commonly used on Linux packaging, compression, compression tools, he has a lot of parameters, folding only to enumerate the commonly used compression and decompression parametersParameters:-c:create set up the parameters of compressed archives;-X: Extracting parameters of compressed archives;-Z: Whether to use gzip compression;-V: Files are displayed during compression;-F: The top document name, immediately after F to answer the file name, can
People accustomed to tar czvf or tar xzvf may encounter tar.xz also want to use a single command to fix decompression or compression. Not really. The parameters of the XZ format, such as Z, for Gzip,j are directed at bzip2.To create a tar.xz file: Just tar cvf xxx.tar xxx/create xxx.tar files First, then use Xz-z Xxx.tar to compress Xxx.tar into XXX.TAR.XZExtra
Parameters:
-c:create to establish the parameters of compressed files;
-X: Unzip the parameters of the compressed file;
-Z: Do you want to use gzip compression;
-V: The process of compressing the display of files;
-F: Top document name, immediately followed by the file name, can not add parameters
For example: One, all the files in the entire/home/www/images directory are packaged as/home/www/images.tar
[root@xoaocom ~]# tar-cvf/home/www/images
format I have used. It does not take up too much CPU when compressing, and it can get a very ideal compression rate. Use the following format to compress a directory:# TAR-ZCVF archive_name.tar.gz directory_to_compressUnzip:# TAR-ZXVF Archive_name.tar.gzThis unpacking command will unlock the document under the current directory. Of course, you can also use this command to squeeze the path of the unpacking:
format I have used. It does not take up too much CPU when compressing, and it can get a very ideal compression rate. Use the following format to compress a directory:# TAR-ZCVF archive_name.tar.gz directory_to_compressUnzip:# TAR-ZXVF Archive_name.tar.gzThis unpacking command will unlock the document under the current directory. Of course, you can also use this command to squeeze the path of the unpacking:
Python's self-contained tarfile module makes it easy to read the tar archive, and cow B can handle using GZIP and bz2 to compress archive files tar.gz and tar.bz2.Corresponding to the Tarfile is the ZipFile module, ZipFile is the processing of zip compression. Please note: os.system (cmd) can make the Python script execute commands, including: Tar-czf *.tar.gz *,tar
The tar command not only extracts a package, but also extracts the files that are specified in the software package. Today a friend asked me, I just went to find the information, hehe
root@ubuntu:/tmp# tar-tf json-1.2.1.tgz
package.xml
json-1.2.1/readme json-1.2.1/config.m4
Json-1.2.1/config.w32
json-1.2.1/json.dsp
json-1.2.1/json.c
json-1.2.1/json_parser.c
Json-1.2.1/json_parser.h
json-1.2.1/php
Remove directory structure plus--strip-components N
Such as: Compressed file Eg.tar file information for Src/src/src/eg.txt
Run TAR-XVF Eg.tar--strip-components 1
Result: Src/src/eg.txt
If you run TAR-XVF Eg.tar--strip-components 3
The result of the decompression is: eg.txt
In the decompression, if you want to specify the extract directory, you can add
Refer to How to link http://www.linuxdiyf.com/viewarticle.php?id=194348Don't talk nonsense directly on the exampleTAR-XZVF $basePath/apd.tar.gz jar/apd.jar-o > $basePath/apd.jar$basePath/apd.tar.gz files to unzipJar/apd.jar the relative file path within the apd.tar.gz file to be decompressed. How this path gets: TAR-TVF *.tar.gz.-O to decompress standard output>./lib-lib64-include/jars/apd.jar redirect output to a fileOther articles that can be consul
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.