当前位置:网站首页>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
边栏推荐
- Realization of a springboard machine
- 广州海关支持保障食品、农产品和中药材等民生物资稳定供港
- MySQL(二)
- Understanding of FTP protocol
- Ribbon核心源码解析
- Django数据库操作以及问题解决
- Fastposter v2.8.4 release e-commerce poster generator
- 接口自动化框架脚手架-利用反射机制实现接口统一发起端
- Must the MySQL table have a primary key for incremental snapshots?
- Fabric. How to use js brush?
猜你喜欢

Teach you how to handle the reverse SVG mapping of JS

What is the best way to learn machine learning
![[200 opencv routines] 213 Draw circle](/img/8d/a771ea7008f84ae3a3cf41507448ec.png)
[200 opencv routines] 213 Draw circle

How to distinguish and define DQL, DML, DDL and DCL in SQL

Dotnet uses crossgen2 to readytorun DLL to improve startup performance

如何使用 DataAnt 监控 Apache APISIX
![[Li Kou - dynamic planning] sort out topic 1: basic topics: 509, 70, 746, 62, 63, 343, 96 (with links, topic descriptions, problem solving methods and codes)](/img/02/4dbd97c8b8df1c96b7c8e1460aeda2.png)
[Li Kou - dynamic planning] sort out topic 1: basic topics: 509, 70, 746, 62, 63, 343, 96 (with links, topic descriptions, problem solving methods and codes)

I'm almost addicted to it. I can't sleep! Let a bug fuck me twice!

Katalon当中的debug调试

无线通信模块定点传输-点对多点的具体传输应用
随机推荐
Installing MySQL database (CentOS) in Linux source code
June training (day 28) - Dynamic Planning
MySQL查看数据库性能常用命令
I'm almost addicted to it. I can't sleep! Let a bug fuck me twice!
在OpenCloudOS使用snap安装.NET 6
Understand 12 convolution methods (including 1x1 convolution, transpose convolution and deep separable convolution)
Read PDF image and identify content
满电出发加速品牌焕新,长安电动电气化产品吹响“集结号”
Ffmpeg audio and video recording
Ideal interface automation project
建立自己的网站(11)
Wireless communication module fixed-point transmission - point to multipoint specific transmission application
知道 Redis RDB 这些细节,可以少踩很多坑
Mysql通用二进制安装方式
无线模块透明传输技术的物联网应用案例
生成token
The boss asked me to write an app automation -- yaml file reading -- with the whole framework source code attached
Cisco * VRF(虚拟路由转发表)
Google open source dependency injection framework Guice Guide
Katalon框架测试一个web页面操作实例代码