当前位置:网站首页>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
边栏推荐
- Teach you how to handle the reverse SVG mapping of JS
- Must the MySQL table have a primary key for incremental snapshots?
- MySQL general binary installation method
- 接口自动化框架脚手架-利用反射机制实现接口统一发起端
- sentinel
- 使用 ABAP 操作 Excel 的几种方法
- Ble Bluetooth module nrf518/nrf281/nrf528/nrf284 chip scheme comparison
- metersphere使用js刷新当前页面
- Please consult me. I run the MYSQL to MySQL full synchronization of flykcdc in my local ide. This is in my local ide
- Starting from full power to accelerate brand renewal, Chang'an electric and electrification products sound the "assembly number"
猜你喜欢
An idea plug-in that automatically generates unit tests, which improves the development efficiency by more than 70%!
Understand 12 convolution methods (including 1x1 convolution, transpose convolution and deep separable convolution)
sentinel
【NLP】今年高考英语AI得分134,复旦武大校友这项研究有点意思
[Unity]EBUSY: resource busy or locked
BLE蓝牙模块NRF518/NRF281/NRF528/NRF284芯片方案对比
Mysql通用二进制安装方式
如何使用 DataAnt 监控 Apache APISIX
学习机器学习的最佳路径是什么
[Unity]内置渲染管线转URP
随机推荐
[unity] built in rendering pipeline to URP
Fabric.js 笔刷到底怎么用?
Google open source dependency injection framework Guice Guide
What is the best way to learn machine learning
Internet of things application case of wireless module transparent transmission technology
[leetcode daily question] [December 19, 2021] 997 Find the town judge
Ribbon core source code analysis
读取pdf图片并识别内容
Please consult me. I run the MYSQL to MySQL full synchronization of flykcdc in my local ide. This is in my local ide
JSON模块、hashlib、base64
Minimum stack < difficulty coefficient >
港伦敦金行情走势图所隐藏的信息
Install using snap in opencloudos NET 6
手把手教你处理 JS 逆向之 SVG 映射
Resolution: overview of decentralized hosting solution
BLE蓝牙模块NRF518/NRF281/NRF528/NRF284芯片方案对比
Starting from full power to accelerate brand renewal, Chang'an electric and electrification products sound the "assembly number"
R语言plotly可视化:plotly可视化互相重叠的直方图(histogram)、在直方图的底部边缘使用geom_rug函数添加边缘轴须图Marginal rug plots
Set up your own website (11)
线程和线程池