当前位置:网站首页>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 .
边栏推荐
- Use grid to realize left, middle and right layout, and the middle content is adaptive
- 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?
- Food safety | what food can be heated in a microwave oven? You should know these potential safety hazards
- LCD笔记(5)LCD驱动程序框架_使用设备树
- Shutter cachednetworkimage fillet
- 食品安全 | 微波炉什么食品都能加热?这些安全隐患要知道
- Does Flink CDC only support SQL client to submit SQL scripts
- Where is safe to open an account when buying stocks on mobile phones?
- C regards type as generic type T and uses it as generic type of method
- jvm:类加载子系统干什么的?由什么组成?需要记住哪些八股文?
猜你喜欢

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

From January to June, China's ADAS suppliers accounted for 9%, and another parts giant comprehensively laid out the new smart drive track

RMII, smii, gmii, rgmii interfaces of Ethernet Driver
![[typescript] typescript common types (Part 2)](/img/6b/2ac07f16af044bdfb719753ae241cc.png)
[typescript] typescript common types (Part 2)

Kubernetes flannel: host-gw mode

Solution: unable to load the file c:\users\user\appdata\roaming\npm\npx PS1, because running scripts is prohibited on this system.

高通再次「押宝」中科创达,挑战智能驾驶软硬件全栈方案

Emerging security providers to learn about in 2022

基于WebRTC和WebSocket实现的聊天系统

Shutter background graying effect, how transparency, gray mask
随机推荐
Yolov7 training dangerous goods identification pytorch
New function | intelligent open search online customized word weight model
Flink is slow to write redis. Do you have any ideas for optimization?
PXE原理与配置
PXE principle and configuration
Flutter integrated Aurora push
In the digital era, what "golden treasure" is driving the development of pharmaceutical enterprises for a century?
数据查询WHERE
Example of establishing socket communication with Siemens PLC based on C # open TCP communication
JVM: what does the class loading subsystem do? What is it made of? What eight part essay do you need to remember?
Version of NDK matched the requested version 21.0.6113669. versions available locally: 2
Commonly used list Why does isempty() suddenly report null?
概要设计说明书
Food safety | is self-made food purchased online healthy food? Don't fall into these misunderstandings
高通再次「押宝」中科创达,挑战智能驾驶软硬件全栈方案
可移动表空间
基于Locust框架进行文件上传下载性能测试
Display inline+calc realizes left, middle and right layout, and the middle is adaptive
V00 - do whatever you want when you are old
基于BERT的情感分析模型