当前位置:网站首页>1312_ Apply 7z command for compression and decompression
1312_ Apply 7z command for compression and decompression
2022-07-26 13:04:00 【grey_ csdn】
The summary of the use of my commonly used tools is all here : GreyZhang/toolbox: Common tools use queries , Non tutorial , For self reference only ! (github.com)
I don't know when to start , I started using various NAS Or a development board like raspberry pie to build a home server And my personal data center . occasionally , Data handling is required when switching hard disks , And the operation of compression and decompression is indispensable when carrying . If it is a whole volume compression or decompression , I used it most before zip and unzip, There are few detailed usages to master , But a few books can meet my own needs . however , In these two commands, I have never found a better way of volume compression and decompression .
In the use of PC as well as GUI When , The compression tool I use most in recent years is actually 7z, It basically has all the functions of compression and decompression I need . Open source software like this , It is usually good in command line support . So I tried to explore this aspect , The result is satisfactory .
Here it is , Summarize some experience when using this tool .
1. install
Installation is actually very easy , One command is enough , It is important to note that linux There may be different distribution versions in the environment of , Try to install a full-featured version .
sudo apt-get install p7zip-full
2. Compress the specified file
2.1 7z a xxx.7z xxx

This is a way of using less parameters , By default, you can actually generate 7z The format of .

This is through GUI Software to see the effect . First, it can be seen that the format can be recognized , In addition, I can see that the compressed content is ok .
2.2 decompression

I create a new directory , Move the compressed package to this directory . After that, the effect of decompression is as follows .
2.3 Compressed Directory

This is a very happy operating feature , Default input , Compressing a directory and all the files under it is as simple as directly compressing a file .
2.4 7za command

This command is actually dedicated to compression 7z command , and 7z It can also be used for decompression .
2.5 Volume compression
7z The volume compression of is also very simple , It's just adding a parameter to ordinary compression .-vxxxb, among xxx Numerical value , Unit is byte . If you want to use other units , The format is similar ,k、m、g You can use it later . But we need to pay attention , The parameters here are all lowercase .

I found the corresponding information from the help information . Next , Try to compress the folder above into a volume 500KB The volume of the book .

2.6 Decompress the volume

Another simple operation , It's the same as processing a file . Here, you only need to pass in the name of the first sub volume , Other operations are done automatically , It is very convenient .
2.7 Compress into the specified format , such as zip

Nothing special , Just add a parameter control . above , I realized a zip Sub volume compression . And decompression is also the same processing method as the previous volume decompression .

Single volume compression , It's actually a simpler operation .
such ,7z The basic usage of the tool, which is more practical for me, has been sorted out . Maybe , From then on, my server This is the most commonly used compression and decompression software on .
边栏推荐
- Example of establishing socket communication with Siemens PLC based on C # open TCP communication
- In the digital era, what "golden treasure" is driving the development of pharmaceutical enterprises for a century?
- Who is responsible for the problems of virtual idol endorsement products? And listen to the lawyer's analysis
- 一文看懂GaitSet中的test.py
- Router. Push(), router. Reply(), router. Go()
- About the copy of picture address links
- LCD notes (4) analyze the LCD driver of the kernel
- 为什么要做“密评”?
- 火山引擎云上增长方案全景:30+方案齐出,兵发优势领域
- MySQL可以自定义变参存储函数吗?
猜你喜欢

Notes....

Kubernetes flannel: host-gw mode
![[5gc] what is 5g slice? How does 5g slice work?](/img/8c/52ba57d6a18133e97fa00b6a7cf8bc.png)
[5gc] what is 5g slice? How does 5g slice work?

Food safety | is self-made food purchased online healthy food? Don't fall into these misunderstandings

Elementary notes of binary tree

笔记。。。。

学习pinia 介绍-State-Getters-Actions-Plugins

【5GC】什么是5G切片?5G切片如何工作?

Shutter background graying effect, how transparency, gray mask

Today in history: IBM obtained the first patent; Verizon acquires Yahoo; Amazon releases fire phone
随机推荐
Display inline+calc realizes left, middle and right layout, and the middle is adaptive
LCD笔记(6)LCD驱动程序框架_配置引脚
Yolov7 training dangerous goods identification pytorch
一文看懂GaitSet中的test.py
Various extensions of hcip-9.ospf
概要设计说明书
LCD notes (6) LCD driver framework_ Configuration pin
【5GC】什么是5G切片?5G切片如何工作?
今日睡眠质量记录75分
父组件访问子组件的方法或参数 (子组件暴漏出方法defineExpose)
Flutter textfield sets the height and automatically wraps lines, and the rounded border removes the underline
一款超好用的神器Apifox,甩 Swagger 几条街...(荣耀典藏版)
Kuzaobao: summary of Web3 encryption industry news on July 25
Detailed interpretation of hole convolution (input and output size analysis)
New function | intelligent open search online customized word weight model
基于WebRTC和WebSocket实现的聊天系统
Kubernetes----高级存储之PV和PVC简介
二叉树的初阶笔记
食品安全 | 网购的自制食品就是健康食品?莫要陷入这些误区
(int argc, char** argv) command line parameters in visual stdio (VS)