Zip can compress files, or you can compress directories. The compression extension is. zip.Syntax: zip[option [compressed filename. zip][file directory name to compress]Common options:-R: Compresses the directory along with all subdirectories and files in the directory.[[email protected] ~]# zip-r 111.zip 111 adding:111/(stored 0) adding:111/1.txt.gz (stored 0) [[email protected] ~] # ls111 111.txt 1.txt 222.txt anaconda-ks.cfg install.log.syslog test11111.txt 111.zip 222 333 Insta Ll.log ShellY
When unzip is used in Linux, the End-of-central-directory signature not found and vertusignature errors are returned.In Linux, when unzip is used for decompression, an error is returned:$ Unzip abc.zipArchive: abc.zipEnd-of-central-directory signature not found. Either this file is notA zipfile, or it constitutes one disk of a multi-part archive. InLatter case th
above/tmp/etc.tar.gz files in the file?[Email protected] ~]# tar-tzvf/tmp/etc.tar.gz# because we use gzip compression, when we look at the files in the tar file,# you have to add Z to this parameter! It's important!Example three: Extracting/tmp/etc.tar.gz files under/USR/LOCAL/SRC[Email protected] ~]# cd/usr/local/src[[email protected] src]# tar-xzvf/tmp/etc.tar.gz# in the case of presets, we can unzip the file anywhere! In the case of this example,#
Two commonly used decompression commands: Unrar and unzip, respectively, corresponding to two WinRAR and WinZip software on the Windows platform.[Email protected] ~]# Cd/usr/local/tomcat/webapps[[email protected] webapps]# unrar x Studentnavigation.rar # extract to current directory[[email protected] webapps]# unrar x Stunumber.rar # extract to current directory[[email protected] WebApps] #unzip studentnavi
RAR command
Function descriptionRAR is a common compression format in Windows systems, and this type of compressed file is mainly exchanged with Windows systems instead of compressing or archiving files. Use the following:
rar [Options] ZIP file name
Common parameters
Options
Description
E
Unzip the file to the current directory
L[T,B]
List Compressed Document in
On Windows Zip package, RZ upload to Linux, found garbled. Record the resolution process:1. Determine the default character set on WindowsUnder Windows platform, directly on the command line, enter: CHCPIn the results shown, a number appears, regardless of the character set that the number represents. Record this number.2.locale viewing the character set of a Linux environmentIf Lang=zh_cn. UTF-8 display is not ZH_CN. UTF-8, it is modified to ZH_CN first. UTF-8.Export LANG=ZH_CN. UTF-83.rz uploa
Tags: using the win default install compression garbled ubunt command zipBecause the win is using GBK encoding, the zip files packaged in win under the use of unzip uncompressed in Ubuntu will appear garbled problem.Solution:Change software, without unzip, use Unar18.04 is installed by default and can be used if there is no default installationsudo Install UnarThis command installs.1. List the contents of t
Tags: Ota win and 3.1 htm str RAC OSI multiple
Original: Linux unzip multiple. gz or. tar.gz files at once
Unzip multiple compressed packagesFor extracting multiple .gz files, use this command:for gz in *.gz; do gunzip $gz; doneFor extracting multiple .tar.gz files, use the following command:for tar in *.tar.gz; do tar xvf $tar; doneExtension: Tar commandTar [-] A--catenate--concatenate | C--
During website migration, too many files in the website directory will consume a lot of time, so we need to use the compression and decompression commands, such as, I need to back up the/home/wwwroot folder, however, because wwwroot contains tens of thousands or even more files, you need to use the zip command to compress the wwwroot file and then transfer it:
CD/wwwroot
Zip-r wwwroot.zip wwwroot
OK ,the wwwrootfile is compressed into the wwwroot.zip format, which is uploaded an
For details about tar, gzip, and unzip commands, refer to tar to create files and directories. Using tar, you can create a file (backup file) for a specific file, change the file in the file, or add a new file to the file. Tar was originally used to create files on tape. Now, you can create files, such as floppy disks, on any device. Using the tar command, you can package a large number of files and directories into one file, which is very useful for
background: still a friend, when invoking the unzip command with PHP, there is a problem with permission being rejected again.Notice: The problem described here is to execute PHP files using the PHP command line, so the process is the owner of the user who is logged in, not the Nginx user.Log in as root to set read and Execute permissions for MyUser's home directoryNotice:CD to a directory, you need to have Execute permissions on the directory, otherw
Compression zip under Linux, unzip unzip commandI personally test the summary:Linux installation Unzip zipInstall command: Yum install-y unzip zip# Unzip Yasuo.zipMethod One:Install command: Yum install-y unzip zip1. I want to com
This class implements the reference PHP manual comment/** * Function: Unzip file in ZIP format * author:friker * date:2015-15-14 * reference:http://php.net/manual/zh/ref.zip.php * All Rights reserved:[emailprotected] */class unzip{public Function __construct () {//init code here ... Heade R ("Content-type:text/html;charset=utf8"); /*** unzip the file to the spe
Unzip
Tar
Common Decompression Commands: TAR-ZXVPF : Unzip TAR-ZCVPF: Compression # tar [-j|-z] [CV] [-F established file name ] filename ... Packaging and Compression # tar [-j|-z] [TV] [-F established file name ] View file name # tar [-j|-z] [XV] [-F established file name ] [-C directory ] Unzip Parameters: - Z : Through gzip the s
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.