such as file jdk-7u80-linux-x64.gzTo view file types:File jdk-7u80-linux-x64.gzJdk-7u80-linux-x64.gz:gzip compressed data, from Unix, last Modified:sat Apr 11 11:12:15 2015Can see that the gzip file typeExtractgzip-d jdk-7u80-linux-x64.gz # Extracted here after the production jdk-7u80-linux-x64, and removed the jdk-7u8
. tar.gz and. gz files are two different files that need to be treated differently, and of course the decompression commands are different, so let's share their respective decompression methods.
1.. tar.gz file, which is a compressed file of the tar file, can be decompres
Tar
Unpack: Tar xvf Filename.tar
Packing: Tar cvf filename.tar dirname
(Note: Tar is packed, not compressed.) )
---------------------------------------------
. gz
Decompression 1:gunzip filename.gz
Decompression 2:gzip-d filename.gz
Compression: gzip FileName
. tar.gz and. t
Common commands:Zip:Package: Zip something.zip Something (directory please add-r parameter)Unpacking: Unzip somethingSpecify path:-d parameterTarPackage: TAR-ZCVF Something.tar SomethingUnpacking: TAR-ZXVF Something.tarSpecify path:-C parameterCompression/decompression tools commonly used on Linux,Main explanation Zip,rar,tarBefore you talk about the compression
separately, rather than compressed together . Refer to the TAR directive below.GZIP-DV exp1.gz//Unzip the exp1.gz and display information such as compression ratio.GZIP-CD exp1.gz > EXP.1//The result of exp1.gz decompression is p
each compressed file: The size of the compressed file, the size of the uncompressed file, the compression ratio, the name of the uncompressed file-R recursively finds the specified directory and compresses all of its files or is decompressed. -T test to check that the compressed f
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
Tags: Zip tarOne, zip compressionInstall Zip and unzip firstYum Install-y Zip/unzipzip 1.txt.zip 1.txtCompressed file 1.txt, compressed filename is called 1.txt.zip zip -r 123.zip 123/Compressed folder 123/specified name 123.zip unzip 1.txt.zipThe zip file does not delete the source
gzip unzip files-j Support bzip2 Extract files-Z Support Compress unzip files-V Show Operation procedure-L File System boundary settings-K Keep the original file without overwriting-m reserved files are not overwritten-W confirm the correctness of the compressed fileThe optional parameters are as follows:-B Set Number
package of all.tar. -R indicates adding files. # Tar-uf all.tar logo.gif is a new logo.gif file in tarbao all.tar.tar.-u indicates the file to be updated. # The tar-tf all.tar command is to list all files in the all.tar package.-t indicates to list the files. # The tar-xf a
--config java 2>1 '
echo "Result:"
echo "$sa"
Echo
echo "Would I find anything when I look in so result for Jdk1.6.0_05???"
echo "$sa" | grep "jdk1.6.0_05"
echo "Nope. I thought not! But the reason should is clear now! "
Eof
SSH TipsRemotely compare filesSSH remote-hosts Cat Memos/memo.draft | Diff Memos.new-Cat Memos.new | SSH speedy Diff-memos/memo.draft#diff Tar cf-some_directory | SSH Kramer "(cd/path/to/destination;
Common Linux Compressed file extensions*. Z Compress compressed files (has been replaced by gzip)*.gz gzip Program Compressed files*.BZ2 BZIP2 Program Compressed files (better than gzip, but only for one file to compress)*.tar Tar program packaged data, no compression (using
This article mainly introduces the example of using tarfile to compress and decompress the tar archive file in Python. This article provides examples of decompressing and compressing the code directly. if you need it, refer to the example below.
The zipfile module corresponds to the tarfile, and the zipfile process zip compression. Note: OS. system (cmd) allows Python scripts to execute commands, including
-jcvf/tmp/etc.tar.bz2/etc # Note that the file name after parameter f is taken by yourself, and we are accustomed to using. Tar as a recognition.# if the z parameter is added, the. tar.gz or. tgz represent the gzip compressed tar file ~# If you add the J parameter, use. tar.bz2 as the
File compression and packaging in linux --- compress, gzip, zcat, bzip2, bzcat, tar, find, tarfile, tarball, --- compresszcatCommon Linux compressed file extensions
*. Z compress compressed files (replaced by gzip)
*. Gz gzip compressed files
*. Bz2 bzip2 compressed files (better than gzip, but only one
Under the Linux system, there is no command to RAR file operation, if need file operation to RAR format, we need to install third party software RAR and Unrar.1, linux rar management software Download the official address is:http://www.rarlab.com/2, we can download and install according to the following command, here i download linux_x64 latest version of RAR software---rar 5.21 Beta 1 for Linux x64[Email p
,
Compression command under AIX1. Backup: The plus-I parameter can be used to back up files or directories, with the-p parameter to compress the files to be backed up, but only files less than 2G can be compressed.2. Compress: Compress the file and replace the source file with the. Z file.3. Gzip: Compress the file and
File compression and packaging in linux --- compress, gzip, zcat, bzip2, bzcat, tar, find, tarfile, tarballCommon Linux compressed file extensions
*. Z compress compressed files (replaced by gzip)
*. Gz gzip compressed files
*. Bz2 bzip2 compressed files (better than gzip, but only one
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
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.