当前位置: 首页 > news >正文

遂溪网站建设公司hao123影视

遂溪网站建设公司,hao123影视,如何做求婚网站,wordpress刷新缓存20231117在ubuntu20.04下使用ZIP命令压缩文件夹 2023/11/17 17:01 百度搜索:Ubuntu zip 压缩 https://blog.51cto.com/u_64214/7641253 Ubuntu压缩文件夹zip命令 原创 chenglei1208 2023-09-28 17:21:58博主文章分类:LINUX 小工具 文章标签命令行压缩包U…

20231117在ubuntu20.04下使用ZIP命令压缩文件夹
2023/11/17 17:01


百度搜索:Ubuntu zip 压缩

https://blog.51cto.com/u_64214/7641253
Ubuntu压缩文件夹zip命令 原创
chenglei1208 2023-09-28 17:21:58博主文章分类:LINUX 小工具
文章标签命令行压缩包Ubuntu文章分类运维阅读数1554

一、安装zip命令
如果您的Ubuntu系统没有安装zip命令,可以使用以下命令进行安装:

sudo apt-get update
sudo apt-get install zip


输入密码并等待安装完成。

二、压缩单个文件夹
在命令行中,使用zip命令压缩单个文件夹非常简单。以下是基本的命令格式:

zip -r 压缩包名.zip 要压缩的文件夹路径

其中,-r参数表示递归压缩子目录。

例如,如果要将目录/home/user/documents压缩为documents.zip,可以使用以下命令:

zip -r documents.zip /home/user/documents

执行上述命令后,压缩包documents.zip将会生成在当前命令行所在目录下。

解压缩

解压目录

使用unzip命令时,可以指定解压目录。如果不指定解压目录,则默认解压到当前目录。例如,将压缩文件example.zip解压到/home/user/目录下,可以使用以下命令:

unzip example.zip -d /home/user/


三、压缩多个文件夹
如果要同时压缩多个文件夹,可以在命令行中依次指定要压缩的文件夹路径,并用空格进行分隔。例如,要同时压缩/home/user/documents和/home/user/pictures两个文件夹,可以使用以下命令:

zip -r archive.zip /home/user/documents /home/user/pictures

执行上述命令后,压缩包archive.zip将会生成在当前命令行所在目录下。

四、使用过滤器
有时候,在压缩文件夹时,您可能只需要压缩其中的部分文件或目录。Zip命令提供了一些过滤器选项,可以满足您的需求。

以下是几个常用的过滤器:

-x:排除指定的文件或目录。
-i:仅包括指定的文件或目录。
例如,要压缩目录/home/user/documents,但排除其中的/home/user/documents/cache目录,可以使用以下命令:

zip -r documents.zip /home/user/documents -x /home/user/documents/cache

执行上述命令后,压缩包documents.zip将会生成在当前命令行所在目录下,其中不包含/home/user/documents/cache目录。

五、总结
通过本篇文章,您已经学会了在Ubuntu系统中使用zip命令压缩文件夹的基本操作。如果您想了解更多zip命令的使用方法和选项,请查阅zip命令的帮助文档。


rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ ll
total 1505032
drwxrwxr-x  3 rootroot rootroot      4096 11月 17 13:59 ./
drwxr-xr-x 29 rootroot rootroot      4096 11月 17 13:54 ../
-rw-rw-r--  1 rootroot rootroot 770564405 11月 17 13:58 1356.tar.gz
-rw-rw-r--  1 rootroot rootroot 770560989 11月 17 14:00 1359.tar.gz
drwxrwxr-x 26 rootroot rootroot      4096 11月 17 13:56 fastiot/
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ zip fastiot_20231117_1402.zip fastiot/

rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ ll
total 1505032
drwxrwxr-x  3 rootroot rootroot      4096 11月 17 13:59 ./
drwxr-xr-x 29 rootroot rootroot      4096 11月 17 13:54 ../
-rw-rw-r--  1 rootroot rootroot 770564405 11月 17 13:58 1356.tar.gz
-rw-rw-r--  1 rootroot rootroot 770560989 11月 17 14:00 1359.tar.gz
drwxrwxr-x 26 rootroot rootroot      4096 11月 17 13:56 fastiot/
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ zip fastiot_20231117_1402.zip fastiot/
  adding: fastiot/ (stored 0%)
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ zip -r fastiot_20231117_1403.zip fastiot/


  adding: fastiot/ConfigManagerNode/inc/Config_key.h (deflated 67%)
  adding: fastiot/ConfigManagerNode/inc/capabilityManager.h (deflated 53%)
  adding: fastiot/ConfigManagerNode/src/ (stored 0%)
  adding: fastiot/ConfigManagerNode/src/configManager.cpp (deflated 88%)
  adding: fastiot/ConfigManagerNode/src/Makefile (deflated 52%)
  adding: fastiot/ConfigManagerNode/src/capabilityManager.cpp (deflated 74%)
  adding: fastiot/ConfigManagerNode/src/Config_get.cpp (deflated 77%)
  adding: fastiot/DataEngine/ (stored 0%)
  adding: fastiot/DataEngine/inc/ (stored 0%)
  adding: fastiot/DataEngine/inc/TalkCollector.h (deflated 45%)
  adding: fastiot/DataEngine/inc/BatteryCollector.h (deflated 43%)
  adding: fastiot/DataEngine/inc/MonitorCollector.h (deflated 45%)
  adding: fastiot/DataEngine/inc/Upgrade_Processor.h (deflated 43%)
  adding: fastiot/DataEngine/inc/Cloud_Processor.h (deflated 47%)
  adding: fastiot/DataEngine/inc/SDLog_Processor.h (deflated 43%)
  adding: fastiot/DataEngine/inc/Rtsp_Processor.h (deflated 45%)
  adding: fastiot/DataEngine/inc/S3Client_Processor.h (deflated 48%)
  adding: fastiot/DataEngine/inc/IOCtrl_Collector.h (deflated 45%)
  adding: fastiot/DataEngine/inc/Cgi_Processor.h (deflated 38%)
  adding: fastiot/DataEngine/inc/FactoryCollector.h (deflated 46%)
  adding: fastiot/DataEngine/inc/Config_Collector.h (deflated 43%)
  adding: fastiot/DataEngine/inc/VideoProducer.h (deflated 36%)
  adding: fastiot/DataEngine/inc/list.h (deflated 80%)
  adding: fastiot/DataEngine/inc/SDCardRecord_Processor.h (deflated 48%)
  adding: fastiot/DataEngine/inc/AudioProducer.h (deflated 37%)
  adding: fastiot/DataEngine/inc/ReverVideo_Collector.h (deflated 47%)
  adding: fastiot/DataEngine/inc/MsgCore.h (deflated 67%)
  adding: fastiot/DataEngine/src/ (stored 0%)
  adding: fastiot/DataEngine/src/MsgCoreControlServer.cpp (deflated 71%)
  adding: fastiot/DataEngine/src/Config_Collector.cpp (deflated 81%)
  adding: fastiot/DataEngine/src/MsgCoreControlClient.cpp (deflated 74%)
  adding: fastiot/DataEngine/src/AudioProducer.cpp (deflated 74%)
  adding: fastiot/DataEngine/src/ReverVideo_Collector.cpp (deflated 77%)
  adding: fastiot/DataEngine/src/SDCardRecord_Processor.cpp (deflated 79%)
  adding: fastiot/DataEngine/src/SDLog_Processor.cpp (deflated 72%)
  adding: fastiot/DataEngine/src/Upgrade_Processor.cpp (deflated 71%)
  adding: fastiot/DataEngine/src/Cloud_Processor.cpp (deflated 73%)
  adding: fastiot/DataEngine/src/Makefile (deflated 61%)
  adding: fastiot/DataEngine/src/BatteryCollector.cpp (deflated 73%)
  adding: fastiot/DataEngine/src/MonitorCollector.cpp (deflated 75%)
  adding: fastiot/DataEngine/src/FactoryCollector.cpp (deflated 76%)
  adding: fastiot/DataEngine/src/Cgi_Processor.cpp (deflated 71%)
  adding: fastiot/DataEngine/src/S3Client_Processor.cpp (deflated 72%)
  adding: fastiot/DataEngine/src/VideoProducer.cpp (deflated 77%)
  adding: fastiot/DataEngine/src/MsgCoreServ.cpp (deflated 80%)
  adding: fastiot/DataEngine/src/IOCtrl_Collector.cpp (deflated 74%)
  adding: fastiot/DataEngine/src/TalkCollector.cpp (deflated 77%)
  adding: fastiot/DataEngine/src/Rtsp_Processor.cpp (deflated 70%)
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ ll
total 2292296
drwxrwxr-x  3 rootroot rootroot      4096 11月 17 14:04 ./
drwxr-xr-x 29 rootroot rootroot      4096 11月 17 13:54 ../
-rw-rw-r--  1 rootroot rootroot 770564405 11月 17 13:58 1356.tar.gz
-rw-rw-r--  1 rootroot rootroot 770560989 11月 17 14:00 1359.tar.gz
drwxrwxr-x 26 rootroot rootroot      4096 11月 17 13:56 fastiot/
-rw-rw-r--  1 rootroot rootroot       166 11月 17 14:02 fastiot_20231117_1402.zip
-rw-rw-r--  1 rootroot rootroot 806147076 11月 17 14:04 fastiot_20231117_1403.zip
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C101$ 


 

http://www.hkea.cn/news/199808/

相关文章:

  • 低价网站公司软文怎么写
  • 东莞市建设公共交易中心网站百度官网首页
  • 如何建立的网站能争钱优化营商环境 助推高质量发展
  • 做百度网站营销型网站建设排名
  • 网站域名被黑国际新闻最新消息战争
  • 苏州网站开发公司济南兴田德润厉害吗网络自动推广软件
  • 广药网站建设试卷株洲最新今日头条
  • 网站建设管理考核办法微信推广平台怎么做
  • 网站新闻模块代码网络推广有哪些常见的推广方法
  • 合肥大型网站如何推广普通话
  • 高端网站制作软件怎么样推广自己的店铺和产品
  • 无障碍浏览网站怎么做关键词seo排名优化推荐
  • wordpress 247seo推广系统
  • 做深圳门户网站起什么名字好泰州seo外包公司
  • 网站视频上传怎么做百度站长平台论坛
  • wordpress农业模板下载小时seo
  • 做网站语言排名2018发帖推广哪个平台好
  • 销氪crmseo入门讲解
  • 蒙阴哪有做淘宝网站的钓鱼网站制作教程
  • 网站如何做导航条下拉菜单怎么做百度网页
  • 网站开发都做什么平台推广精准客源
  • 网站建设共享ip宁波seo搜索引擎优化
  • 学校网站建设必要性搜索引擎排名
  • 哪里有做区块链网站的百度网址大全在哪里找
  • 加盟平台网站怎么做竞价托管多少钱一个月
  • wordpress 微信 代码网站关键词怎么优化排名
  • 网站推广维护考研培训班哪个机构比较好
  • 网站后台生成器人工智能培训班收费标准
  • 在线做app的网站武汉网络营销公司排名
  • 了解深圳网站页面设计潍坊百度关键词优化