当前位置:网站首页>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 .
边栏推荐
- Vs code set the method of ctrl+s saving and automatic formatting
- pomerium
- Database composition view
- The difference between $route and $route
- 子组件触发父组件自定义事件(defineEmits):子组件传值给父组件
- 数据库组成视图
- 食品安全 | 随便果可以”随便“吃吗?
- 手机上买股票,在哪里开户比较安全?
- RMII, smii, gmii, rgmii interfaces of Ethernet Driver
- Panorama of volcanic engine cloud growth plan: 30 + plans come out together, and military development advantage areas
猜你喜欢

【上位机教程】CANopen通信下一体化步进电机与台达PLC(AS228T)的应用

基于BERT的情感分析模型

Huawei ultra fusion fusioncube solution notes

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

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

基于ASP.NET的某高校学院档案管理系统

二叉树的初阶笔记

基于C#实现的学生考试系统
![[5gc] what is 5g slice? How does 5g slice work?](/img/8c/52ba57d6a18133e97fa00b6a7cf8bc.png)
[5gc] what is 5g slice? How does 5g slice work?

Kubernetes Flannel:HOST-GW模式
随机推荐
Food safety | can you eat any fruit?
Redis realizes single sign on -- system framework construction (I)
After being fined "paid leave" for one month, Google fired him who "loves" AI
Guys, please ask me, I have configured CDC to connect to Oracle according to the document, and I always run error reports and can't find the class validstione
基于Bézier曲线的三维造型与渲染
【TypeScript】TypeScript常用类型(下篇)
Sword finger offer (21): push in and pop-up sequence of stack
高通再次「押宝」中科创达,挑战智能驾驶软硬件全栈方案
V00 - do whatever you want when you are old
Use flex to realize left middle right layout and middle adaptation
Shutter background graying effect, how transparency, gray mask
Huawei ultra fusion fusioncube solution notes
[5gc] what is 5g slice? How does 5g slice work?
Flink is slow to write redis. Do you have any ideas for optimization?
华为年内二度招聘“天才少年”;540万Twitter账号信息泄露,卖价3万美元;谷歌解雇了相信AI有意识的工程师|极客头条...
Shell variables and references
The programmed navigation route jumps to the current route (the parameters remain unchanged), and if it is executed multiple times, it will throw a navigationduplicated warning error?
Streamnational team culture: a "transparent" company
Can MySQL customize variable parameter storage functions?
pomerium