先看help

Copyright (c) - Info-ZIP - Type 'zip "-L"' for software license.
Zip 3.0 (July 5th ). Usage:
zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]
The default action is to add or replace zipfile entries from list, which
can include the special name - to compress standard input.
If zipfile and list are omitted, zip compresses stdin to stdout.
-f freshen: only changed files -u update: only changed or new files
-d delete entries in zipfile -m move into zipfile (delete OS files)
-r recurse into directories -j junk (don't record) directory names
- store only -l convert LF to CR LF (-ll CR LF to LF)
- compress faster - compress better
-q quiet operation -v verbose operation/print version info
-c add one-line comments -z add zipfile comment
-@ read names from stdin -o make zipfile as old as latest entry
-x exclude the following names -i include only the following names
-F fix zipfile (-FF try harder) -D do not add directory entries
-A adjust self-extracting exe -J junk zipfile prefix (unzipsfx)
-T test zipfile integrity -X eXclude eXtra file attributes
-y store symbolic links as the link instead of the referenced file
-e encrypt -n don't compress these suffixes

所以 最简单的方法就是

zip -q -r foldername.zip path/foldername/

解压缩时 直接使用

unzip foldername.zip 

就可以了.

zip 与 unzip的简单使用的更多相关文章

  1. Linux下的压缩zip,解压缩unzip命令详解及实例

    实例:压缩服务器上当前目录的内容为xxx.zip文件 zip -r xxx.zip ./* 解压zip文件到当前目录 unzip filename.zip ====================== ...

  2. Linux常用命令: zip、unzip 压缩和解压缩命令

    zip基本用法是: zip [参数] [打包后的文件名] [打包的目录路径] 常用参数: -a 将文件转成ASCII模式 -F 尝试修复损坏的压缩文件 -h 显示帮助界面 -m 将文件压缩之后,删除源 ...

  3. 【转载】 Linux常用命令: zip、unzip 压缩和解压缩命令

    Linux常用命令: zip.unzip 压缩和解压缩命令   Linux常用命令: zip.unzip 压缩和解压缩命令 zip的用法 基本用法是: zip [参数] [打包后的文件名] [打包的目 ...

  4. linux下压缩与解压(zip、unzip、tar)详解

    linux下压缩与解压(zip.unzip.tar)详解 2012-05-09 13:58:39| 分类: linux | 标签:linux zip unzip tar linux命令详解 |举报|字 ...

  5. Linux命令zip和unzip

    问题描述:        使用Linux中命令zip和unzip 问题解决: 命令名: zip  功能说明:压缩文件. 语 法:zip [-AcdDfFghjJKlLmoqrSTuvVwXyz$][- ...

  6. Linux下的压缩zip,解压缩unzip命令具体解释及实例

    实例:压缩server上当前文件夹的内容为xxx.zip文件 zip -r xxx.zip ./* 解压zip文件到当前文件夹 unzip filename.zip ================= ...

  7. linux中tar命令(打包、压缩、解压)、zip和unzip、rar多种压缩文件

    一.名词解释 打包:将一大堆文件或目录变成一个总的文件[tar命令] 压缩:将一个大的文件通过一些压缩算法变成一个小文件[gzip,bzip2等] Linux中很多压缩程序只能针对一个文件进行压缩,这 ...

  8. Linux命令-压缩解压命令:zip、unzip

    zip [选项] [压缩后文件名] [压缩前的文件或者目录名称] -r表示压缩目录(recursion 递归) rm -rf * 删除当前目录下面的所有文件,也包括目录和子目录ls cp /etc/s ...

  9. Linux环境下使用yum安装zip和unzip

    Linux环境下使用yum安装zip和unzip. yum install zip yum install unzip

随机推荐

  1. LCA树上倍增

    LCA就是最近公共祖先,比如 节点10和11的LCA就是8,9和3的LCA就是3. 我们这里讲一下用树上倍增来求LCA. 大家都可以写出暴力解法,两个节点依次一步一步往上爬,直到爬到了相同的一个节点. ...

  2. chm文件转换成html文件,解决chm文件无法使用浏览器打开的问题

    每天学习一点点 编程PDF电子书免费下载: http://www.shitanlife.com/code CHM是英语“Compiled Help Manual”的简写,即“已编译的帮助文件”.CHM ...

  3. dp HDU - 5074

    按题意推表达式 #include<cstdio> #include<cstring> #define max(a, b) (a)>(b)?(a):(b) ][], num ...

  4. Redis漏洞,远程攻击

    文章转自http://blog.csdn.net/whs_321/article/details/51734602 http://blog.knownsec.com/2015/11/analysis- ...

  5. 在Qt项目中如何添加一个已有的项目作为子项目

    新建一个子目录项目(具体方法参见<类似Visual Studio一样,使用Qt Creator管理多个项目,创建子项目>),然后需要添加的项目移动到该子目录项目目录下,再在其pro文件中添 ...

  6. python基础学习第六天

    import os #文件读写 不用自动关闭with open('test.txt','r') as f: #一次性读取所有 data = f.read() #print(data)print('-- ...

  7. 关于Nginx理解

    由于微信小程序要使用Https,但是又不能修改已有线上的配置.所以最简单的方法就是使用nginx转发,在nginx上使用https,然后再转发到内部服务器.Nginx由于其优良的性能.一台4核16GB ...

  8. 《MySQL必知必会》[07] 管理事务处理

    1.管理事务处理 一个或多个数据库操作(查询/更新等)组成"事务",也就是说,事务实际上是一组按顺序执行的操作单位: 原子性:整个事务为整体执行,要么执行,要么不执行,不能出现执行 ...

  9. apache、nginx的虚拟域名配置和rewrite配置,以及web缓存的几种方式

    web缓存一般用来缓解数据库压力. 通常有几种方法,文件静态化,缓存服务memcached.redis等. 伪静态,一般指在url上貌似访问静态html页的形式,这样有利于搜索引擎访问到网站页面,实际 ...

  10. Missing value auth-url required for auth plugin password

    在控制台输入openstack相关命令时提示如下: openstack user list Missing value auth-url required for auth plugin passwo ...