---------------------------------------------. tgzDecompression: Tar zxvf filename.tgzCompression: Unknown. tar.tgzDecompression: Tar zxvf FileName.tar.tgzCompression: Tar zcvf FileName.tar.tgz FileName---------------------------------------------. zipDecompression: Unzip Filename.zipCompression: Zip Filename.zip DirName---------------------------------------------. rarDecompression: rar a Filename.rarCompression: R ar e filename.rarRAR please to: htt
. junit.testpublic void Testgzip () throws IOException {byte[] bytes = " Alex Everyone Karma card crash of a AH the card of the death of the crash of the feeling open on the AO trench Assad gas The song of the third tick tick tick tick ticking ". GetBytes ();//bytes Compression// Verify the compression effect comparison System.out.println ("before compression:"); System.out.println (bytes.length); for (byte b:bytes) {System.out.print (b + "");} System.out.println (); SYSTEM.OUT.PRINTLN ("compres
Linux unzip command . tar unpacking: tar xvf test.tar pack: tar CVF Test.tar DirName (note: Tar is packaging, not compression! . 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:bunzip2 filename.bz2compression: bzip2-z FileName. tar.
file content can be seen, actually useful only 4 filesThe rar and Unrar Two executables are moved to the/usr/local/bin directory, the rarfiles.lst configuration files are moved, and the default.sfx File to the appropriate directory.4, when we installed RAR, now to do is the RAR file compression and decompression. The common operations commands are as follows:[[email protected]52013515201351. rar // view action V[t[a],b] verbosely list Archive contents [Technical[all],bare] [Email
" Open normally under Windows, while open in Linux will be garbled, its solution for the terminal input:Iconv-f gbk-t UTF8 y05 document. txt > y05 document. Txt.utf8Then open the "y05 document. Txt.utf8" This file, the text see the garbled problem solved.Unzip the win environment packaging RAR file garbled ( due to the encoding, in Windows packaging of the Chinese file, after extracting garbled, prompt for invalid encoding format, because Windows is GBK encoding format, and Ubuntu under the def
Tar zxvf phddns_raspberry.tgzTar default unzip to current directoryParameters:At least one of the following parameters must be run when you run tar-A,--catenate,--concatenateMerging an archive with an existing archive-C,--createCreate a new archive-D,--diff,--compareCompare the differences between the archive and the current file--deleteRemove from archive-R,--appendAppend to end of archive-T,--listLists the directories of files in the archive-U,--upd
objTarget.Items.Count > 0
End Sub
To extract the code:
Copy Code code as follows:
UnZip "D:\test.iso", "D:\test.zip"
Msgbox "OK"
Sub CopyFolder (ByVal mysourcedir, ByVal mytargetdir)
Set fso = CreateObject ("Scripting.FileSystemObject")
If not FSO. FolderExists (Mysourcedir) Then
Exit Sub
ElseIf not FSO. FolderExists (Mytargetdir) Then
Fso. CreateFolder (Mytargetdir)
End If
Set Objshell = CreateObject ("Shel
/b.txtstudy/a/study/a/a/study/a/d/[[emailprotected] ~]$ lskernel linux study 2. Package and use gzip compression[[emailprotected] ~]$ lskernel linux study study.tar[[emailprotected] ~]$ tar -zcvf study.tar.gz study/ 使用 gzip 压缩study/study/a.cstudy/b.txtstudy/a/study/a/a/study/a/d/[[emailprotected] ~]$ lskernel linux study study.tar 3. Package and use BZIP2 compressiontar -jcvf study.tar.bz2 study/4. View a list of compressed files[[emailprotected] ~]$ lskernel linux study study.tar
1, Tar-cvf/data/sc2.tar/data (package only, do not compress)Pack the files under the/data into Sc.tar. All two of them are absolute paths.tar-zcvf/data/sc2.tar.gz/data2. Unzip the/tmp/etc.tar.gz file under/USR/LOCAL/SRC[Email protected] ~]# CD/USR/LOCAL/SRC[Email protected] src]# tar-zxvf/tmp/etc.tar.gz---------------------3, go to a directory, and then extract the other absolute path of the compressed files into this folderExampleCd/data/sc5Tar-zxvf/
Compressed Stream class:Gzipoutputstream and Zipoutputstream can compress data into gzip format and zip format respectivelyGzipinputstream and Zipinputstream can be compressed into gzip format or zip data extracted to restore the originalGzip is multiple files compressed into one file, Zip is a single file compression;D Multiple files compressed sequentially, Out.putnextentry is to compress the file's entry information into the compressed file, getnextentry to determine whether there is the next
Import Os,os.pathimport ZipFile def zip_dir (dirname,zipfilename): FileList = [] if Os.path.isfile (dirname): F Ilelist.append (dirname) else:for root, dirs, files in Os.walk (dirname): For name in Files: Filelist.append (Os.path.join (root, name)) ZF = ZipFile. ZipFile (Zipfilename, "w", Zipfile.zlib.DEFLATED) for tar in filelist:arcname = Tar[len (dirname):] #print Arcname zf.write (Tar,arcname) zf.close () def unzip_file (Zipfilename, Unziptodir): If not os.path.exists (Unz Ip
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.