Tar-C: Create compressed archives-X: Unzip-T: View content-r: Append files to the end of a compressed archive file-U: Update files in original compressed packageThese five are stand-alone commands, which use one of the compression decompression, and can be used with other commands but only one. The following parameters are optional when compressing or extracting files as needed.-Z: With gzip properties-j: With the bz2 attribute-Z: With the Compress at
Solution One, use Pyton to deal with
1.VI uzip File
2. Copy content (Python)
#!/usr/bin/env python
#-*-Coding:utf-8-*-
# uzip.py
Import OS
Import Sys
Import ZipFile
Print "Processing File" + sys.argv[1]
File=zipfile. ZipFile (Sys.argv[1], "R");
For name in File.namelist ():
Utf8name=name.decode (' GBK ')
Print "Extracting" + utf8name
pathname = Os.path.dirname (utf8name)
If not os.path.exists (pathname) and pathname!= "":
Os.makedirs (Pathname)
data = File.read (name)
If not os
This installation error can be resolved by modifying the path, this tutorial will teach you to quickly solve the MindManager 15 Chinese version of the installation process Dynazip UnZip Error.
Problem Description: Dynazip UnZip error:error Creating output file (Problem extracting file (s))
Cause Analysis: Dynazip UNZIP Error This installation is due
Recently cleaned up the Linux zip/unzip command, as follows:
Command name: Zip
Function Description: Compress file.
Syntax: Zip [-acddffghjjkllmoqrstuvvwxyz$][-b
Supplemental Note: Zip is a widely used compression program, the file after it compression will produce a ". zip" extension of the compressed file.
Parameters
-A adjusts the executable automatic decompression file.
-b
-C adds a comment for each compressed file.
-d deletes the specif
Unzip Direct Overlay DecompressionWhen extracting unzip, it is sometimes necessary to directly overwrite the extracted files, especially when installing the deployment in an automated script.# #在unzip命令后, increase the parameters of-O, then no longer ask, directly overwrite the original file decompression, save a lot of things.
Unzip the image with PHP, press directly to the 8k size behind the full display.
Who can tell me where to set the size or solve it in other ways?
Reply to discussion (solution)
What unzip the picture?? Speak clearly.
I compress all the JPG images first, then upload the compressed package to the server on the webpage, unzip and put it under the directory I w
Run the following commands in the/home directory:Cd/home # enter the/home Directory1. compress the mydatafile under the/home directory as mydata.zip.Zip-rmydata.zipmydata # compressing mydata Directories2. Decompress mydata.zip in the/homecatalog to the mydatabak directory.Unzipmydata.zip-dmydatabak3. compress the abcfolder and 123.txtfile under the/Home Directory into abc123.zip
Zip-rabc123.zipabc123.txt4. Extract the wwwroot.zip file in the/homedirectory to the/home directory.
Unzipwwwroot.zip
I use the more reliable, also relatively simple, where archiver is very powerful, support ZIP format tar format, only need to provide a path to compress the existing folder.Compression:1 varFS = require (' FS ');2 varArchiver = require (' archiver '));3 4 varOutput = Fs.createwritestream (' Archiver-unzip.zip ');5 varArchive = archiver (' Zip ');6 7Archive.on (' Error ',function(err) {8 Throwerr;9 });Ten One archive.pipe (output); A Archive.bulk ([ -{src: [' archiver/** ']} - ]); theArchive
Data.zip file has more than 4G, decompression when the problem.
Archive:data.zip
End-of-central-directorysignature not found. Either Thisfile is not
A zipfile, or itconstitutes one disk of a multi-partarchive. In the
latter case the centraldirectory and ZipFile comment would be found on
The last disk (s) of thisarchive.
Unzip:cannot find Zipfiledirectory in one of Bbs.zip or
Data.zip.zip,and cannot find Data.zip.ZIP, period.
In this case, you need to use 7zi
Original link:Linux under the unzip command Daquan. tarUnpacking: Tar xvf Filename.tarPackage: Tar cvf filename.tar DirName(Note: Tar is packaged, not compressed!) )———————————————. gzDecompression 1:gunzip filename.gzDecompression 2:gzip-d filename.gzCompression: gzip FileName. tar.gz and. tgzDecompression: Tar zxvf FileName.tar.gzCompression: Tar zcvf FileName.tar.gz DirName———————————————. bz2Decompression 1:bzip2-d filename.bz2Decompression 2:BUNZ
Install command: Yum install-y unzip zip1. I want to compress a file abc.txt and a directory dir1 into yasuo.zip:# zip-r yasuo.zip abc.txt dir12. I downloaded a yasuo.zip file that I want to decompress:Unzip Yasuo.zip3. I have Abc1.zip,abc2.zip and Abc3.zip in the current directory, and I want to unzip them together:# unzip abc\? ZipNote: A character is represent
Linux comes with a unzip program can unzip the file, the decompression command is: Unzip Filename.zip also provides a ZIP program compressed zip file, command is zip filename.zip files Files will be compressed to Filename.zip also look at the suffix of your file, different suffixes of the file decompression and compression of the command are not the same summary
From: http://blog.csdn.net/mmllkkjj/article/details/6768294/ExtractTAR–XVF File.tar//Unpacking the TAR PackageTAR-XZVF file.tar.gz//Decompression tar.gzTAR-XJVF file.tar.bz2//Decompression tar.bz2TAR–XZVF file.tar.z//Unzip tar. ZUnrar e file.rar//decompression rarUnzip File.zip//Unzip zipSummarize1, *.tar with TAR–XVF decompression2, *.gz with gzip-d or gunzip decompression3, *.tar.gz and *.tgz with TAR–XZF
Zip is probably the most used document compression format. Its greatest advantage is in the use of different operating system platforms, such as Linux, Windows and Mac OS. The downside is that the compression ratios are not very high, and tar.gz and TAR.GZ2 are doing very well in terms of compression. Gossip less, let's get to the point:We can compress a directory with the following commands:# zip-r Archive_name.zip directory_to_compressThe following is if you
Earlier, I mentioned. How to package the file as a zip package, then how to unzip the zip file package into a normal file? It is easier to unpack the zip package into a normal package than to package the file as a zip. Because there is a multilevel file compression, there is no multi-level file decompression. In other words, when compressing, you have to plug all the files into the compressed package. Decompression only needs to decompress the first l
then compress to XXX.tar.gzTo extract gz, in fact, is to read a single file, the Python method is as follows:Import Gzipimport osdef un_gz (file_name): "" " ungz Zip file" "" F_name = File_name.replace (". Gz", "") # Get the name of the file and remove G_file = gzip. Gzipfile (file_name) #创建gzip对象 Open (f_name, "w+"). Write (G_file.read ()) #gzip对象用read () when opened, writes to open () The file that was created. g_file.close () #关闭gzip对象 TarXXX.tar.gz decompression t
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.