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
1, the simplest compression command: WinRAR a asdf.txt.rar asdf.txt a means that the compression action, after the first parameter is the compressed file name, the suffix is of course rar, the last parameter is the file name to be compressed2, the simplest decompression command: WinRAR e asdf.txt.rar e means to perform the decompression, the extracted
Php uses exec to execute unzip to decompress the file. Why are the extracted civilized names in Chinese in a format similar to UTF-8 characters? For example, 2064 php uses exec to execute unzip to decompress the file
Why are the extracted civilized names in Chinese in a format similar to UTF-8 characters?
For example
Unzip the PHP code of a Zip file
Function unzip ($ location, $ newLocation ){
If (exec ("unzip $ location", $ arr )){
Mkdir ($ newLocation );
For ($ I = 1; $ I
$ File = trim (preg_replace ("~ Inflating :~ "," ", $ Arr [$ I]);
My zip file content is a Chinese name, there are passwords, find several solutions on the Internet only one can, so here's a record:The first is to install 7zip to decompress, 7zip solution here, but can't solve my problem, still have garbled problemFinally, the solution is found here.The process is as follows:1,Lsar test.zipAll files are listed (lsar-list archive file contents) and the
Common commandsUbuntu uncompressed garbledExtract by Unzip line command, specify character setUnzip-o CP936 Xxx.zip (with GBK, GB18030 can also)Interestingly, there is no explanation for this option in Unzip's manual, unzip--help has a simple one-line explanation for this parameter.Zip command:# Zip Test.zip test.txtIt compresses the Test.txt file to Test.zip, an
1. Unzip:The software package with the tar.gz extension under Linux is a package that is packaged with a tar program and compressed with the GZIP program. To install this package, the package needs to be decompressed, the package can be decompressed using "TAR-ZXFV filename.tar.gz" , and the extracted files are in a directory named filename. Into the directory, you can see the extracted files.2. Installation:After the extract command is executed, ther
CEN decompress the. ZIP file and search a lot of methods on the Internet, using System. IO. compression. GZipStream uses the J # library function and the Java-based library function. However, many of them are not very good. In the end, it is still the System function System. shell. folder. copyHere (oItem [, intOptions]) is the best choice. The specific method is as follows:
1. Add the reference Shell32.dll, which can be found in Windows \ system32.2.
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, p
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
#!/usr/bin/env python#-*-coding:utf-8-*- fromZipFileImport*ImportZipFile#Unzip the zip filedefunzip (): Source_zip="C:\\update\\sw_servers_20120815.zip"Target_dir="c:\\update\\"Myzip=ZipFile (source_zip) myfilelist=myzip.namelist () forNameinchMyfilelist:f_handle=open (Target_dir+name,"WB") F_handle.write (myzip.read (name)) F_handle.close () myzip.close ()#add a file to an existing ZIP packagedefAddzip ()
Tar. download the source code file in linux and install tar in some cases. the decompression of the xz Z file is used to tar decompression. the xz file is still a bit confusing. google is as follows. to decompress the files in this format, you need the xz tool. if The xz tool is not installed, install it... tar. download the source code
First, send the unpacking package to the Linux server:1. After downloading the. tar.gz file on the WinDOS, send it to Linux via the SFTP client such as WinSCP2. Direct download via wget command in Linux#wget [Options] []wget Common parameters:-B: Background download (default download to current directory)-O: Save the downloaded file with a custom name. The downloaded fi
IMG File compression and decompressionThe initrd.img in the 2.6 kernel is cpio compressed and is no longer a ext2 format used by the 2.4 kernel and cannot be mounted using the Mount-o loop. Need to decompress with gunzip and then use Cpio to unpack
The code is as follows:Cp/boot/initrd-***.img initrd.img.gzGunzip initrd.img.gzmkdir INITRDMV Initrd.img INITRDCD INITRDCPIO-IVMD By using the above command, th
. Files with a. cpio.gz/.cgz extension:#gzip-DC File.cgz | Cpio-div9. Files with a. cpio/cpio extension:#cpio-div File.cpioor CPIO-DIVC File.cpio10. Installation of file with the extension of. RPM:#rpm-I. file.rpm11. Extract files with the extension of. RPM:#rpm2cpio file.rpm | Cpio-div12. Installation of files with a. deb extension:#dpkg-I. File.deb13. Unzip files with a. deb extension:#dpkg-deb-fsys-tarfi
CEN decompress the. ZIP file and search a lot of methods on the Internet, using System. IO. compression. GZipStream uses the J # library function and the Java-based library function. However, many of them are not very good. In the end, it is still the System function System. shell. folder. copyHere (
OItem
[
,
IntOptions. The specific method is as follows:
1. Add the reference Shell32.dll, which can be found in Windows \ system32.2. Add the method.
Usually we will download a variety of software resources or systems on some websites, and so on, and most of the downloaded files are zip, RAR and other compressed file format, these files need to be installed in the computer to unzip the software can be unpacked open, but many new users neglect the computer has installed decompression software, Opens the downloa
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.