In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the arrangement of compression and decompression commands commonly used in Linux". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn the "Linux commonly used compression and decompression commands to sort out" it!
File suffix decompression / unpack compression / package remarks * .tartar xvf file.tartar cvf file.tar srcDirtar*.gzgunzip file.gz
Gzip-d file.gzgzip filegzip*.tar.gz
* .tgz
Tar zxvf file.tar.gz
Tar zxvf file.tgz
Tar zcvf file.tar.gz srcDirtar & gunzip*.bz2bzip2-d file.bz2
Bunzip2 file.bz2bzip2-z file-or-dirbzip2*.tar.bz2tar jxvf file.tar.bz2tar jcvf file.tar.bz2 srcDirbzip2*.bzbzip2-d file.bz
Bunzip2 file.bzbzip2 automatically creates bz2 format files, but cannot create bz format bzip2*.tar.bztar jxvf file.tar.bz ditto bzip2*.Zuncompress file.Zcompress file-or-dircompress*.tar.Ztar Zxvf file.tar.Ztar Zcvf file.tar.Z fileOrDircompress*.tar.xzxz-d file.tar.xz
Tar-xvf file.tar (two commands together)
Or
Tar-Jxvf file.tar.xz
Tar-cvf file.tar fileOrDir
Xz-z file.tar
Or
Tar-Jcvf file.tar.xz fileOrDir
Xz*.lzmalzma-d file.lzma
Unlzma file.lzmalzma fileOrDirlzma*.tar.lzmalzma-dkf file.tar.lzmalzma-kf file.tarlzma*.zipunzip file.zipzip file.zip fileOrDirzip*.7z7za x file.7z7za a file.7z fileOrDir7zip*.rarrar x file.rarrar a file.rar fileOrDirrar/unrar, unrar cannot create a package * .lhalha-e file.lhalha-a file.lha fileOrDir*.rpmrpm2cpio file.rpm | cpio-div*.debar p file.deb file.tar.gz | tar zxf-
* .tar
* .tgz
* .tar.gz
* .tar.Z
* .tar.bz
* .tar.bz2
* .zip
* .cpio
* .rpm
* .deb
* .slp
* .arj
* .rar
* .ace
* .lha
* .lzh
* .lzx
* .lzs
* .arc
* .sda
* .sfx
* .lnx
* .zoo
* .cab
* .kar
* .cpt
* .pit
* .sit
* .sea.tar
* .tgz
* .tar.gz
* .tar.Z
* .tar.bz
* .tar.bz2
* .zip
* .cpio
* .rpm
* .deb
* .slp
* .arj
* .rar
* .ace
* .lha
* .lzh
* .lzx
* .lzs
* .arc
* .sda
* .sfx
* .lnx
* .zoo
* .cab
* .kar
* .cpt
* .pit
* .sit
* .sea
SEx x file.*sEx a file.* fileOrDirsEx itself has no actual function, but just calls the corresponding program according to the file name suffix to complete the corresponding function, and the program required by the specific suffix name needs to be installed.
Reference article:
Tar online document
Compressing files under Linux or UNIX cheat sheet
LZIP
Z:simple tar & feathering
XZ
Magical Google:Linux compression and decompression
File type executes action commands. Tar unpack tar xvf FileName.tar.tar package tar cvf FileName.tar DirName.gz extract 1gunzip FileName.gz.gz extract 2gzip-d FileName.gz.gz compression gzip FileName.tar.gz and .tgz compression tar zxvf FileName.tar.gz.tar.gz and .tgz compression tar zcvf FileName.tar.gz DirName.bz2 decompression 1bzip2-d FileName.bz2.bz2 decompression 2bunzip2 FileName.bz2.bz2 compression bzip2-z FileName.tar.bz2 decompression Tar jxvf FileName.tar.bz2.tar.bz2 compression tar jcvf FileName.tar.bz2 DirName.bz decompression 1bzip2-d FileName.bz.bz decompression 2bunzip2 FileName.bz.tar.bz decompression tar jxvf FileName.tar.bz.Z decompression uncompress FileName.Z.Z compression compress FileName.tar.Z decompression tar Zxvf FileName.tar.Z.tar.Z compression tar Zcvf FileName.tar.Z DirName.zip decompression unzip FileName.zip.zip compression zip FileName.zip DirName.rar decompression rar x FileName.rar.rar compression rar a FileName.rar DirName
Note: rar please go to: http://www.rarsoft.com/download.htm to download and extract, copy the rar_static to the / usr/bin directory (other directories specified by the $PATH environment variable are also available):
The code is as follows:
[root@www2 tmp] # cp rar_static / usr/bin/rar
Other compression and decompression commands:
.rpm (unpack: rpm2cpio FileName.rpm | cpio-div)
.deb (unpack: ar p FileName.deb data.tar.gz | tar zxf -)
.tar
Unpack: tar xvf FileName.tar
Packaging: tar cvf FileName.tar DirName
(note: tar is packaging, not compression! )
-
.gz
Decompress 1:gunzip FileName.gz
Decompress 2:gzip-d FileName.gz
Compression: gzip FileName
.tar.gz
Decompress: tar zxvf FileName.tar.gz
Compression: tar zcvf FileName.tar.gz DirName
-
.bz2
Decompress 1:bzip2-d FileName.bz2
Decompress 2:bunzip2 FileName.bz2
Compression: bzip2-z FileName
.tar.bz2
Decompress: tar jxvf FileName.tar.bz2
Compression: tar jcvf FileName.tar.bz2 DirName
-
.bz
Decompress 1:bzip2-d FileName.bz
Decompress 2:bunzip2 FileName.bz
Compression: unknown
.tar.bz
Decompress: tar jxvf FileName.tar.bz
Compression: unknown
-
.Z
Decompress: uncompress FileName.Z
Compression: compress FileName
.tar.Z
Decompress: tar Zxvf FileName.tar.Z
Compression: tar Zcvf FileName.tar.Z DirName
-
.tgz
Decompress: tar zxvf FileName.tgz
Compression: unknown
.tar.tgz
Decompress: tar zxvf FileName.tar.tgz
Compression: tar zcvf FileName.tar.tgz FileName
-
.zip
Decompress: unzip FileName.zip
Compression: zip FileName.zip DirName
-
.rar
Decompress: rar a FileName.rar
Compression: rar e FileName.rar
Rar can be downloaded at http://www.rarsoft.com/download.htm!
After decompressing, copy rar_static to the / usr/bin directory (other directories specified by the $PATH environment variable are also acceptable):
[root@www2 tmp] # cp rar_static / usr/bin/rar
-
.lha
Decompress: lha-e FileName.lha
Compression: lha-a FileName.lha FileName
Lha can be downloaded at http://www.infor.kanazawa-it.ac.jp/.../lhaunix/!
> after decompression, copy lha to the / usr/bin directory (other directories specified by the $PATH environment variable are also acceptable):
[root@www2 tmp] # cp lha / usr/bin/
-
.rpm
Unpack: rpm2cpio FileName.rpm | cpio-div
-
.tar .tgz .tar.gz .tar.Z .tar.bz .tar.bz2 .zip .cpio .rpm .deb .slp .arj .rar .ace .lha .lzh
.lzx .lzs .arc .sda .sfx .lnx .zoo .cab .kar .cpt .pit .sit .sea
Decompress: sEx x FileName.*
Compression: sEx a FileName.* FileName
SEx only calls the relevant procedures, there is no compression, decompression function, please pay attention!
SEx can be downloaded at http://sourceforge.net/projects/sex!
After decompressing, copy sEx to the / usr/bin directory (other directories specified by the $PATH environment variable are also acceptable):
[root@www2 tmp] # cp sEx / usr/bin/
At this point, I believe that everyone on the "Linux commonly used compression and decompression command arrangement" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.