Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the compression and decompression methods under Linux

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "what are the compression and decompression methods under Linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

.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/

This is the end of the content of "what are the compression and decompression methods under Linux". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report