当前位置:网站首页>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
边栏推荐
- [Unity][ECS]学习笔记(一)
- Several methods of using ABAP to operate Excel
- 丢弃 Tkinter!简单配置快速生成超酷炫 GUI!
- An error is reported when uninstalling Oracle
- Wireless communication module fixed-point transmission - point to multipoint specific transmission application
- [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)
- 股票开户用中金证券经理发的开户二维码安全吗?知道的给说一下吧
- Installing MySQL database (CentOS) in Linux source code
- [unity][ecs] learning notes (III)
- [unity][ecs] learning notes (II)
猜你喜欢

Metersphere实现UI自动化元素不可点击(部分遮挡)

Resolution: overview of decentralized hosting solution

The boss asked me to write an app automation -- yaml file reading -- with the whole framework source code attached

港伦敦金行情走势图所隐藏的信息

Markdown -- basic usage syntax

Idea failed to connect to SQL Sever

Several methods of using ABAP to operate Excel
Ribbon核心源码解析

使用 ABAP 操作 Excel 的几种方法

物联网5种无线传输协议特点大汇总
随机推荐
Dotnet uses crossgen2 to readytorun DLL to improve startup performance
I'm almost addicted to it. I can't sleep! Let a bug fuck me twice!
Idea failed to connect to SQL Sever
MySQL common commands for viewing database performance
sqlcmd 连接数据库报错
[NLP] this year's college entrance examination English AI score is 134. The research of Fudan Wuda alumni is interesting
fastposter v2.8.4 发布 电商海报生成器
Guangzhou Customs supports the stable supply of food, agricultural products, traditional Chinese medicine and other civilian and biological resources to Hong Kong
appliedzkp zkevm(9)中的Bytecode Proof
Katalon当中的output使用方法
Is it safe to open an account with the QR code of CICC securities? Tell me what you know
idea连接sql sever失败
Install using snap in opencloudos NET 6
读取pdf文字和excel写入操作
手把手教你处理 JS 逆向之 SVG 映射
一种跳板机的实现思路
【力扣——动态规划】整理题目1:基础题目:509、70、746、62、63、343、96(附链接、题目描述、解题方法及代码)
An idea plug-in that automatically generates unit tests, which improves the development efficiency by more than 70%!
[Unity][ECS]学习笔记(一)
接口自动化框架脚手架-参数化工具的实现