码迷,mamicode.com
首页 > 其他好文 > 详细

压缩与解压

时间:2020-07-09 22:39:36      阅读:74      评论:0      收藏:0      [点我收藏+]

标签:code   目录   xxx   load   download   str   指定   filename   选项   

.zip后缀压缩与解压

压缩

  1. 当前目录下所有文件
    zip -r xxx.zip ./*
    选项及参数
//zip -r  filename.zip file1 file2 file3 /usr/work/school       zip可以同时压缩多个指定的文件
-r                  递归压缩
-d                  删除.zip中某一文件
//zip -d xxx.zip test.txt      删除xxx.zip中test.txt文件 
-m                  与-d相反,向,zip中添加某一文件

解压

  1. 解压xxx.zip到当前文件夹下
    unzip xxx.zip

选项及参数

-o                  覆盖解压
-d                  指定解压目的路径
//unzip -o -d /home/zdkk/download test.zip      解压test.zip到指定路径下

压缩与解压

标签:code   目录   xxx   load   download   str   指定   filename   选项   

原文地址:https://www.cnblogs.com/zdkk/p/13276392.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!