Compress (zip) and decompress (unzip) commands in Centos
When using ftp to back up data, it takes a lot of time because there are too many files, so we need to use the compression and decompression commands, for example, I need to back up the/opt/data folder, however, since there are tens of thousands of files in data, you need to use the zip command. For details, see data File compression before transmission:
Cd/opt
Zip-r data.zip data
OK ,
default, no additional installation required)2, the external network on the machine to get the parameters on the job, you can use the parameters of batch processing to find decompression3, the local Jenkins processing good packaging site files, through the Jenkins-cli.jar remote callJava-jar jenkins-cli.jar-s http://192.168.199.2:10000/build test-p buildid=1--username Administrator-- PasswordD AdminThe above means: Build test project, passed buildid
Run the following commands in the/home directory: cd/home # go to the/home directory. 1. compress the mydatadirectory under the/home directory into mydata.zipzipzip-rmydata.zip mydata # compress the mydata Directory. 2. run the following commands in/home: directory operations
Cd/home # enter the/home directory
1. compress the mydatafile under the/home directory as mydata.zip.
Zip-r mydata.zip mydata # compress the mydata Directory
2. decompress mydata.zip in the/homecatalog to the mydatabak dire
When using ftp to back up data, it takes a lot of time because there are too many files, so we need to use the compression and decompression commands, for example, I need to back up the/opt/data folder, however, since there are tens of thousands of files in the data file, you need to use the zip command at this time. for details, see data file compression and transfer: cd/optzip-rdata.zipdataok. the data file is compressed into data.zip format. this is the upload and download method.
When using
decompression.
$ Gzip-L *
Compressed uncompr. ratio uncompressed_name
277 445 43.1% mm.txt
278 445 43.1% sort.txt
277 445 43.1% xx.com
$ Ls
Mm.txt.gz sort.txt.gz xx.com.gz
Example 4: compress a Tartar file, for example, usr.tar. the extension name of the compressed file is .tar.gz.
$ Gzip usr.tar
$ Ls
Usr.tar.gz
Unzip command
How can I expand files compressed by WinZip in Microsoft Windows in Linux? You can use the unzipcommand to unexpand a compress
Decompress the compressed file test.zip under the specified directory tmp. if the same file already exists, the unzip command must overwrite the original file. Unzip
Command name: zip
Function description: compress a file.
Syntax: zip [-AcdDfFghjJKlLmoqrSTuvVwXyz $] [-B
] [-Ll] [-n
] [-T
] [-
] [Shrink files] [files...] [-I
] [-X
]
Recently in the Boss System Cloud Platform deployment script, the tune-up found a problem in the shell script, the following recordsA place to indicate whether to overwrite[[email protected]test]# unzip/home/redis/test/main-d-1544-160316.zip-d/home/redis/test/staribossarchive:/home/redis/test/Main-d-1544-160316.zipreplace/home/redis/test/stariboss/dbpasswordencryption.bat? [Y]es, [N]o, [A]ll, [N]one, [r]ename: Query the
Example: compressing the contents of the current directory on the server as a xxx.zip fileZip-r xxx.zip./*Unzip the zip file to the current directoryUnzip Filename.zip============================Another: Some servers do not install the ZIP package does not execute the zip command, but basically can be used with the tar command, the example is as follows:tar-zcvf/home/zdzlibs.tar.gz/home/zdz/java/zdzlibs/============================Linux zip commandZip
If there are multiple wars in a TOMCAT when a product is packaged, the general way to deploy it is to deploy to the%tomcat_home%/webapps directory, which follows the Java EE specification and puts the referenced jar into the%tomcat_home%/webapps/ Xxxxx.war/web-inf/lib below. But more than one project could possibly refer to the same jar, how do you make multiple projects share this
Tags: UNIX HP-UX unzipWhen you first install the Oracle database on HP-UX, you will not be able to extract the Oracle DB Software media (*.zip format) uploaded to HP-UX because the executable program is not unzip.At this point, you can go to https://updates.oracle.com/unzips/unzips.html this URL to download HP-UX UNIZP media.Now the full text of this article is summarized below:UnZip Utilities DownloadPatches downloaded from Oracle is in the. zip format. To
Linux zip unzip file decompression command setZip is one of the common compression and compression commands in linux. After the file is compressed, it will generate another file ". zip "extension of the compressed file, because zip can be easily used in windows, so zip is a widely used compression program.
Syntax: zip [-acddffghjjkllmoqrstuvvwxyz $] [-B
Parameters:-I -J only saves the file name and its content, without storing any directory name.-J:
[Turn]unzip decompression Windows zip garbled processingHttp://blog.sina.com.cn/s/blog_6c9d65a101012gz0.htmlFriends from Windows sent over the zip file, I unpacked after the garbled, very depressed.Prior to a method, use the command line to change the encoding of the file into UTF8, and then unzip or unzip it before turning. Concrete method: Http://blog.sina.com.
Example 3: detailed information of each compressed file in Example 1 is displayed without decompression.
$ Gzip-L *
Compressed uncompr. ratio uncompressed_name
277 445 43.1% mm.txt
278 445 43.1% sort.txt
277 445 43.1% xx.com
$ Ls
Mm.txt.gz sort.txt.gz xx.com.gz
Example 4: compress a Tartar file, for example, usr.tar. the extension name of the compressed file is .tar.gz.
$ Gzip usr.tar
$ Ls
Usr.tar.gz
Unzip command
How ca
Install zip, unzip, g ++, and other software in linux
Recently, the company has configured a new 64-bit ECs instance. during deployment, it found that the zip/unzip compression and decompression software was not installed.
So I had to install these two software on my own. The best way to use linux is yum. The two commands are installed.
First, list the software installation package:
# Yum list | grep zi
The requirement is that there is a ZIP package on the server that operates the upload, the content is the user's photo, what I need to do is get these photos uploaded and saved to the database. This upload photos, save the database is not difficult, the main problem is to unzip the zip package, and delete the zip package, as well as the extracted files.Before the network to find the extracted files of the code, there is the same problem, that is, afte
Linux system does not have its own compression decompression tool, we need to install it, when using zip or unzip if not installed will appear unzip:command not Found or Zip:command not Found; This happens because there is no installation of unzip and zip;
If the Ubuntu system can be installed with the following commandsudo apt-get install zip
2If it is installed with Yum, install it with the followin
Many users are reflected in the installation of MindManager 15 Chinese version of the process will appear dynazip UnZip error prompts, in fact, this installation error can be resolved through the modified path, this tutorial will teach you to quickly solve MindManager 15 Chinese version of the installation process Dynazip UnZip Error.
Problem Description: Dynazip
of the disk on which the first compressed file is stored.-
two. Unzip commandFunction Description: Unzip extract zip file commandSyntaxParameters-C Displays the uncompressed results to the screen and converts the characters appropriately.-F to update existing files.-L Displays the files contained within the compressed file.-P, similar to the-c parameter, displays the uncompressed results to the screen, but
Linux commonly used compression commands have gzip and zip, two kinds of compression package end different: Zip compressed after file is *.zip, and gzip compressed file *.gz
The corresponding decompression commands are gunzip and unzip.
gzip Command:
# gzip Test.txt
It will compress the file into a file test.txt.gz, the original file is not, unzip the same
# Gunzip Test.txt.gz
It will
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.