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

The method of compressing and decompressing Files by Linux

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

Share

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

This article is to share with you about Linux compression and decompression of files, the editor feels very practical, so share with you to learn, I hope you can get something after reading this article, say no more, follow the editor to have a look.

How to extract .zip and .rar files under Linux, and for the common compressed files .zip and .rar under Window, Linux also has corresponding methods to extract them:

1) for the zip and unzip programs provided under zip linux, zip is the compression program and unzip is the decompression program. There are many options for their parameters. Here is only a brief introduction to them, with examples to illustrate their usage:

# zip all.zip * .jpg this command is to compress all .jpg files into a zip package # unzip all.zip

This command unzips all the files in all.zip

2) for .rar to process .rar files under linux, you need to install RAR for Linux, which you can download from the Internet, but remember, RAR for Linux is not free; you can download RAR 3 from http://www.rarsoft.com/download.htm. 60 for Linux, then install:

# tar-xzpvf rarlinux-3.2.0.tar.gz # cd rar # make

After installation, there are two programs: rar and unrar. Rar is the compression program and unrar is the decompression program. They have many parameter options, so give an example of how they are used:

# rar an all * .jpg

This command compresses all .jpg files into a rar package called all.rar, which automatically appends the .rar extension to the package name.

# unrar e all.rar

This command unzips all the files in all.rar

Summary

1. Tar is decompressed with tar-xvf

2. *. Gz is decompressed with gzip-d or gunzip

3. * .tar.gz and * .tgz are decompressed with tar-xzf

4. * .bz2 decompress with bzip2-d or bunzip2

5. * .tar.bz2 decompress with tar-xjf

6. * .Z decompress with uncompress

7. Tar.Z is decompressed with tar-xZf

8. *. Rar decompressed with unrar e

9. *. Zip decompressed with unzip

The above is the method of Linux compression and decompression of files, the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

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