惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

TaoSecurity Blog
TaoSecurity Blog
Jina AI
Jina AI
雷峰网
雷峰网
月光博客
月光博客
The GitHub Blog
The GitHub Blog
WordPress大学
WordPress大学
B
Blog RSS Feed
美团技术团队
C
CXSECURITY Database RSS Feed - CXSecurity.com
小众软件
小众软件
Security Latest
Security Latest
Microsoft Azure Blog
Microsoft Azure Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cybersecurity and Infrastructure Security Agency CISA
Last Week in AI
Last Week in AI
A
Arctic Wolf
Latest news
Latest news
Attack and Defense Labs
Attack and Defense Labs
I
Intezer
F
Fortinet All Blogs
罗磊的独立博客
MongoDB | Blog
MongoDB | Blog
Webroot Blog
Webroot Blog
S
Secure Thoughts
Help Net Security
Help Net Security
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
V
Visual Studio Blog
P
Proofpoint News Feed
博客园 - 【当耐特】
P
Privacy International News Feed
V
Vulnerabilities – Threatpost
Stack Overflow Blog
Stack Overflow Blog
Know Your Adversary
Know Your Adversary
云风的 BLOG
云风的 BLOG
Hacker News: Ask HN
Hacker News: Ask HN
L
LINUX DO - 最新话题
H
Help Net Security
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
T
Tailwind CSS Blog
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tenable Blog
Cloudbric
Cloudbric
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog

博客园 - yeren2046

RedCoins,一个免费的类似bluecoins的个人财务管理软件 记录一个栈溢出导致的崩溃问题 一个免费的图片数据标注工具 git版本导致的"Permission denied (publickey). fatal: Could not read from remote repository." 只显示全部特定进程名的top信息的shell脚本 linux 上用 core 文件定位线上问题 ffmpeg 时基转换 昇腾卡通道号范围 ffmpeg视频截取 英伟达硬解码错误汇总 DVPP问题汇总 TensorRT生成INT8校准文件 结构体指定初始化 ffmpeg命令行基于英伟达显卡编解码的转码 C++11 获取当前时间戳 基于CUDA查询显卡型号和显存大小 nvjpeg 简单使用 AV_PIX_FMT_CUDA 数据转 RGB C++ do{ } while(0)
常用zip命令
yeren2046 · 2025-12-26 · via 博客园 - yeren2046

1. 压缩

zip [选项] 文件名.zip  /xxx/路径xxx/文件

-v :可视化操作,显示压缩的执行过程,默认就是可视化 -q : 静默操作,不显示指令执行过程 -r :表示递归打包包含子目录的全部内容 -d :从压缩文件内删除指定的文件 -n :n为一个数字,压缩级别是从 1~9 的数字,-1 代表压缩速度更快,-9 代表压缩效果更好 -e :加密压缩文件 -u :追加文件到zip压缩包中

示例:

zip -vr etc.zip /etc/                #压缩/etc/目录,压缩文件名为etc.zip
zip -d myfile.zip smart.txt            #删除压缩文件中的指定文件
zip -e passwd.zip  /etc/passwd         #加密压缩,需要输入密码
zip -u passwd.zip mypasww.txt        #追加mypasww.txt文件到压缩包中

2. 解压

unzip [-Z] [-opts[modifiers]] 压缩包.zip [list] [-x xlist] [-d exdir]


-d :解压文件到指定目录中去
-t    :检查压缩文件是否正确
-l    :仅查看压缩文件包里的内容
-q    :静默模式,即解压时不显示详细解压过程

示例:

unzip -t  ziptext.zip                #检查压缩文件是否正确
unzip -l  ziptext.zip                #查看列出压缩文件里的内容
unzip  ziptext.zip                    #解压文件,默认就是解压到当前目录
unzip ziptext.zip -d /test/         #解压文件到指定的目录

7z命令

压缩命令
7z a filename.7z ./

解压
7z x backup.7z

7z相关命令的原文链接:https://www.linuxcool.com/7z


01bbea8162a8513a108c7c69dcd5e07aa41d161a3bc6a15f8144ca0423e1d96a