当前位置:网站首页>Compression and decompression
Compression and decompression
2022-06-28 10:35:00 【0&1 * 1】
zip/unzip
zip Command can be used to extract files , Or package the file
unzip The command is used to decompress the zip Command compressed “.zip” Compressed package
These two are not Linux Self contained , Need to install
sudo apt-get install zip
sudo apt-get install unzip
zip:
-q: Do not show instruction execution
-r: Recursive processing , Process all files and subdirectories in the specified directory
unzip:
-o Don't ask again during decompression , Directly covered
-d Unzip the file to the specified folder
zip -q -r ~/test.zip test # Specify path compression
unzip test.zip -d ~/tmp/a # Specify the path to unzip
gzip/gunzip
gzip Command to compress files .gzip Is a widely used compression program , After it compresses the file , There will be many places after its name .gz Extension .
gunzip The command is used to extract files .gunzip Is a widely used decompression program , It's used to unravel gzip Compressed files , These compressed files have a default last extension of .gz. in fact gunzip Namely gzip The hard connection of , So whether it's compression or decompression , All available gzip Complete the instruction alone
gzip:
-d Decompress the compressed file
-r Recursively compress all files in the specified directory and subdirectories
-l Display the compression information of the compressed file
-c Reserved source file
gunzip:
-c Output the extracted file to the standard output device
-f Force unpack compressed file
-q Do not display warning messages
-r Recursive processing
-v Show command execution
gzip a.py
gzip -c b.py > b.py.gz # Reserved source file
gzip -d a.py.gz # decompression
bzip2/bunzip2
bzip2 Commands are used to create and manage ( Includes decompression ).bz2 Compressed package of format , It is Linux The next compression software , Than traditional gzip or zip The compression efficiency of , But its compression speed is slow .
bunzip2 Command decompression by bzip2 Created by instruction .bz2 Compressed package
-c Send the compression and decompression results to standard output
-d Perform decompression
-f When the file has the same name , Presets do not overwrite existing files , Using this will overwrite
-k bizp2 After compression or decompression , Will delete the original file , Using this will not delete
-s Reduce memory usage during program execution
-v When compressing or decompressing a file , Displays detailed information
bzip2 a.py
bzip2 -c b.py > b.py.bz2 # Reserved source file
bzip2 -d a.py.bz2 # decompression
collect files
tar The command is used to pack or unpack files , The extension is usually .tar, Specify specific parameters to call gzip or bzip2 Make or unpack the package
-c Create a new package
-x Decompress the package
-f Use the name of the compressed package ,f Parameters cannot be added after them
-i Ignore... In the archive 0 Word block
-v Output relevant information during processing
-z call gzip To compress the archive , And -x Call gzip Complete decompression
-j call bzip2 Compress or decompress
-p Use the original properties of the source file
find -name '*.py' >> ~/a.list
tar -T a.list -zcvf a.tar.gz
tar -zcvf a.tar.gz a.list
Link command
ln The command is used to create links for files , Link types are divided into hard link and symbolic link , The default link type is hard link . If you want to create symbolic links, you must use -s Options
Be careful : The symbolic link file is not a separate file , Many of its properties depend on the source file , So it doesn't make sense to set access permissions for symbolic link files
Soft link will only generate a linked file of a file at the destination , It doesn't actually take up disk space , amount to Windows Shortcuts in . The hard link will generate a file with the same size as the source file at the destination . Both soft links and hard links , Files keep changing synchronously .
-i Ask users before overwriting existing files
-s Create symbols ( soft ) Links instead of hard links
If you modify the contents of the file , Then the links will change with each other
If you delete the source file , Hard links can continue to be used , Soft link failure
边栏推荐
- What is the best way to learn machine learning
- Realization of a springboard machine
- Mysql database overview and installation process
- How to use dataant to monitor Apache apisex
- Correct conversion between JSON data and list collection
- MySQL cannot be opened. Flash back
- appliedzkp zkevm(9)中的Bytecode Proof
- 移动命令
- 【力扣——动态规划】整理题目1:基础题目:509、70、746、62、63、343、96(附链接、题目描述、解题方法及代码)
- Fabric.js 笔刷到底怎么用?
猜你喜欢

满电出发加速品牌焕新,长安电动电气化产品吹响“集结号”
![[Unity]EBUSY: resource busy or locked](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[Unity]EBUSY: resource busy or locked

Summary of characteristics of five wireless transmission protocols of Internet of things

Wireless communication module fixed-point transmission - point to multipoint specific transmission application
![[Unity][ECS]学习笔记(二)](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[Unity][ECS]学习笔记(二)

DlhSoft Kanban Library for WPF

解决表单action属性传参时值为null的问题
![[Unity]EBUSY: resource busy or locked](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[Unity]EBUSY: resource busy or locked

BLE蓝牙模块NRF518/NRF281/NRF528/NRF284芯片方案对比

Solve the problem that the value of the action attribute of the form is null when transferring parameters
随机推荐
Set up your own website (11)
Ideal interface automation project
Mysql通用二进制安装方式
sqlcmd 连接数据库报错
Unity AssetBundle asset packaging and asset loading
Correct conversion between JSON data and list collection
Starting from full power to accelerate brand renewal, Chang'an electric and electrification products sound the "assembly number"
Chapter 3 stack and queue
MySQL查看数据库性能常用命令
Realization of a springboard machine
Fabric.js 笔刷到底怎么用?
物联网5种无线传输协议特点大汇总
2022吴恩达机器学习specialization Week 2 practice lab: Linear regression
sentinel
错过金三银四,找工作4个月,面试15家,终于拿到3个offer,定级P7+
无线模块透明传输技术的物联网应用案例
Katalon全局变量在TestObject引用
股票开户用中金证券经理发的开户二维码安全吗?知道的给说一下吧
Fastposter v2.8.4 release e-commerce poster generator
增强 Jupyter Notebook 的功能,这里有四个妙招