ArUnpacking: 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:BUNZIP2 filename.bz2Compression: Bzip2-z F
A detailed example of compression decompression commands under LinuxExample: 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/ho
ratioThe compression ratio of compressed files can be verified by using the '-l ' option.Gzip-l archieve.gzCheck the compression ratec) Unzip the fileGunzip is used to extract files, where the original (compressed) files are also deleted after being decompressed. Use the-C option to preserve the original file.Gunzip-c archieve.gzUnzip the fileGzip plus the '-d ' option and gunzip have the same effect on compressed files.More details are available fro
System version:[Email protected] ~]# uname-r2.6.32-358.el6.i686[Email protected] ~]# cat/etc/issueCentOS Release 6.4 (Final)Kernel \ r on an \mDownload the Linux generic 32bit mysql package (http://dev.mysql.com/downloads/mysql/).Step Start:1, directly wget download, or download and upload to the server side.2, unzip.3, copy the extracted MySQL directory to/usr/local/mysql and create a new data directory under it.4, new user MySQL and user group MySQL
Tags: top production system component Ubuntu information file system compressed file UbuntRemove directory structure plus--strip-components NSuch as: Compressed file Eg.tar file information is src/src/src/eg.txtRunning TAR-XVF Eg.tar--strip-components 1Results:src/src/eg.txtIf you run TAR-XVF Eg.tar--strip-components 3The results of the decompression are: eg.txtIn the decompression, if you want to specify the decompression directory, you can add the parameter-C target directorySuch as: If we
Compression Decompression Command Introduction. GZ compression to gzip files. bz2 compression to bzip2 file. tar package files, merging multiple files into one directory. tar.gz first into a tar package, then compressed to gzip file. tar.bz2 first into a tar package, then compressed into a bzip2 file. Tar. Z first into a tar package, then compressed to Z file. rarCompress to RAR fileCompressed rar a *.rar fileUnzip Unrar e *.rar. zipCompress to zip fileCompressing zip *.zip filesDecompression
One, ". GZ" Compressed file 1 compression syntax gzip [file]2 decompression syntax gunzip [Compressed file]3 linesGzip can only compress filesGzip does not retain original filesSecond, ". bz2" Compressed file 1 compression syntaxbzip2 [-K] [file]-K Retain original file (keep) after generating compressed file2 decompression syntaxBUNZIP2 [-K] [file]-K retains the original compressed file (keep) after generating the extracted file3 descriptionBZIP2 can only compress filesIii. ". tar.gz"
Tags: Specify file Pre nbsp compression tool Save Command Value Rescommands for the common Unzip tool: gzip (. gz) bzip2 (. bz2) XZ (. xz) compress (. z) tar (. tar)1.gzipSyntax: gzip option FILECommon options:-D-#-C(1)-D decompressionDecompression method: "Gzip-d FILE"(2)-# set compression ratio, default is 6 (range value is 1-9)(3)-C compression when the source file is preserved while the compressed content is entered into the terminal, usually and
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
Address: http://alphawang.com/blog/2014/09/utility-classes-are-evil/
This post is a summary of this artical and this one.What's Utility Classes
A utility class is a class filled with static methods. It is usually used to isolate a "useful" algorithm.>StringUtils,IOUtils,FileUtilsFrom Apache commons;IterablesAndIteratorsFrom guava, andFilesFrom jdk7 are perfect
When Java.util.zip.ZipInputStream and Java.util.zip.ZipOutputStream compress and decompress a zip package with a Chinese name file, the following exception is reported:
Java.lang.IllegalArgumentExceptionAt Java.util.zip.ZipInputStream.getUTF8String (zipinputstream.java:293)At Java.util.zip.ZipInputStream.readLOC (zipinputstream.java:247)At Java.util.zip.ZipInputStream.getNextEntry (zipinputstream.java:74)At Com.test.ZipTest.unZipAssetSouce (ziptest.java:25)At Com.test.ZipTest.main (ziptest.java:
NOTE: * Compress into limited. zip format filesCommon decompression:[Email protected] test]# Unzip-o test.zip-d tmp/Unzip the compressed file Test.zip under the specified directory TMP , and require the unzip command to overwrite the original file if the same file exists.Common compression:[Email protected] test]# zip-r test.zip./*All files and folders under the
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 unzip command is used to decompress compressed package syntax compressed by zipUnzip (parameters) (option)General usage Unzip aaa.zip-d homed/extract to home directory unzip-v aaa.zip View compressed file contents Unzip-t Aaa.zip Verify that compressed files are complete options-C: Display the extracted results to
series of compressed files to make a summary:1) for files ending in. tarTAR-XF All.tar2) for files ending in. gzGzip-d all.gzGunzip all.gz3) for files ending with. tgz or. tar.gzTar-xzf all.tar.gzTar-xzf all.tgz4) files ending with. bz2Bzip2-d all.bz2BUNZIP2 all.bz25) For tar.bz2 end of fileTAR-XJF all.tar.bz26) for. Z End of FileUncompress all. Z7) files ending with. tar.zTar-xzf All.tar.zIn addition, there are methods for extracting common compressed files under window, zip and. Rar,linux.1)
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.