[root@web01 ~]# yum provides zip
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: hkg.mirror.rackspace.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
zip-3.0-.el7.x86_64 : A file compression and packaging utility compatible
[root@web01 ~]# yum install zip-3.0-.el7.x86_64
[root@web01 www]# zip -r -q wwwroot.zip  wwwroot
[root@web01 www]# ls
backup server wwwlogs wwwroot wwwroot.zip
[root@web01 www]# yum search unzip
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: fedora.cs.nctu.edu.tw
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
======================================= N/S matched: unzip =======================================
perl-PerlIO-gzip.x86_64 : Perl extension to provide a PerlIO layer to gzip/gunzip
unzip.x86_64 : A utility for unpacking zip files
[root@web01 www]# yum install -y unzip.x86_64
[root@web01 /]# unzip wwwroot.zip
压缩
tar –cvf jpg.tar *.jpg //将目录里所有jpg文件打包成tar.jpg tar –czf jpg.tar.gz *.jpg //将目录里所有jpg文件打包成jpg.tar后,并且将其用gzip压缩,生成一 个gzip压缩过的包,命名为jpg.tar.gz tar –cjf jpg.tar.bz2 *.jpg //将目录里所有jpg文件打包成jpg.tar后,并且将其用bzip2压缩,生成一个bzip2压缩过的包,命名为jpg.tar.bz2 tar –cZf jpg.tar.Z *.jpg //将目录里所有jpg文件打包成jpg.tar后,并且将其用compress压缩,生成一个umcompress压缩过的包,命名为jpg.tar.Z rar a jpg.rar *.jpg //rar格式的压缩,需要先下载rar for linux zip jpg.zip *.jpg //zip格式的压缩,需要先下载zip for linux 解压
tar –xvf file.tar //解压 tar包 tar -xzvf file.tar.gz //解压tar.gz tar -xjvf file.tar.bz2 //解压 tar.bz2 tar –xZvf file.tar.Z //解压tar.Z unrar e file.rar //解压rar unzip file.zip //解压zip 总结
()、*.tar 用 tar –xvf 解压
()、*.gz 用 gzip -d或者gunzip 解压
()、*.tar.gz和*.tgz 用 tar –xzf 解压
()、*.bz2 用 bzip2 -d或者用bunzip2 解压
()、*.tar.bz2用tar –xjf 解压
()、*.Z 用 uncompress 解压
()、*.tar.Z 用tar –xZf 解压
()、*.rar 用 unrar e解压
()、*.zip 用 unzip 解压

最新文章

  1. JPA中entityManager的CRUD
  2. struts中Cookie实现记住密码
  3. angular ng-model类型格式转化
  4. eclipse for jee版配置tomcat
  5. 转--优化临时表使用,SQL语句性能提升100倍
  6. WinCacheGrind配合XDebug分析PHP程序性能
  7. MySQL中的类Decode用法
  8. java.io.FileNotFoundException: /exapp/hadoop/name/current/VERSION (Permission denied)
  9. cookie记录用户的浏览商品的路径
  10. Anyterm - Introduction
  11. cocos2d-x 移植android竖,横屏设置
  12. CSS3(transform/transition/animation) 基础 总结
  13. redis3--key的操作
  14. SqlServer如何给表添加新的字段以及字段注释
  15. Linux安装网易云音乐
  16. 13_文件系统访问列表_case语句及脚本选项
  17. 嵌入式Linux系统的构成和启动过程
  18. linux下查看php-fpm是否开启以及如何开启
  19. 《Linux内核分析》第三周:Linux系统启动过程
  20. JavaWeb基础—CSS学习小结

热门文章

  1. Nginx配置文件、优化详解
  2. mysql使用过程中出现的问题总结
  3. Chomp类游戏——必胜策略分析
  4. spark学习收集
  5. django的惰性查询
  6. 14-网页,网站,微信公众号基础入门(网页版MQTT,小试牛刀)
  7. GoCN每日新闻(2019-11-10)
  8. 【POJ2676】Sudoku
  9. Morpheus
  10. nginx之allow、deny