Linux的压缩和解压缩的方法总结
作者:cakin24 时间:2022-07-16 00:29:44
Linux的压缩和解压缩的方法总结
一 常用的压缩格式
.zip
.gz
.bz2
.tar.gz
.tar.bz2
二 .zip格式压缩
1、语法
zip 压缩文件名 源文件名
压缩文件
zip -r 压缩文件名 源目录
压缩目录
unzip 压缩文件
解压缩.zip文件
2、说明
.zip的格式在windows和LInux是通用的。
3、实战
root@localhost test]# ls
abc cdf
[root@localhost test]# zip abc.zip abc
adding: abc (stored 0%)
[root@localhost test]# mkdir dirtst
[root@localhost test]# touch ./dirtst/ert
[root@localhost test]# zip -r dirtst.zip dirtst
adding: dirtst/ (stored 0%)
adding: dirtst/ert (stored 0%)
[root@localhost test]# ls
abc abc.zip cdf dirtst dirtst.zip
[root@localhost test]# rm -fr abc
[root@localhost test]# ls
abc.zip cdf dirtst dirtst.zip
[root@localhost test]# unzip abc.zip
Archive: abc.zip
extracting: abc
[root@localhost test]# ls
abc abc.zip cdf dirtst dirtst.zip
[root@localhost test]# rm -rf dirtst
[root@localhost test]# unzip dirtst.zip
Archive: dirtst.zip
creating: dirtst/
extracting: dirtst/ert
[root@localhost test]# ls
abc abc.zip cdf dirtst dirtst.zip
来源:http://cakin24.iteye.com/blog/2391372
标签:Linux,压缩,解压缩
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
百度搜索引擎近期算法调整 变化更新分析
2008-12-31 09:43:00
IIS6.0下ASP的新增功能(四)
2010-04-06 18:22:00
用ASP的安全验证对windows 2000的密码进行修改
2008-04-13 06:58:00
dedecms 5.6修改Dedecms提示信息方法
2010-12-08 16:41:00
美图秀秀2.0.1 超强瘦脸瘦身再优化
2009-10-16 15:48:00
![](https://img.aspxhome.com/file/UploadPic/200910/20091016174522953s.jpg)
Godaddy:如何设置免费及付费电子邮件帐户
2010-05-04 12:35:00
![](https://img.aspxhome.com/file/UploadPic/20104/7/201047131949801s.gif)
11个鲜为人知的网络盈利渠道
2008-03-23 13:42:00
写在2008年的母亲节
2008-05-11 19:22:00
Apache服务器中使用.htaccess实现伪静态URL的方法
2023-07-19 01:14:30
Linux下查看进程打开的文件句柄数和如何修改方法
2023-08-30 14:00:44
搜索引擎究竟有多聪明?
2008-05-12 22:12:00
时代华纳称AOL或再大规模裁员 支出2亿美元
2009-11-13 09:02:00
怎样打造购物网站中的常青树
2009-08-04 16:45:00
Godaddy域名应该怎么指定目录
2010-04-16 12:50:00
IIS6设置网站经常遇到的问题详解
2009-09-10 13:03:00
泄露版Chrome OS骗人!只是谷歌浏览器
2009-10-16 10:47:00
or和<等漏洞问题解决方法
2009-03-09 18:32:00
linux命令实现音频格式转换和拼接的方法
2023-11-02 17:47:32
GoDaddy从我的旧服务器的域名服务器重新定位前,能在我的新托管帐户上运行脚本吗
2010-04-13 12:54:00
浅谈流量少的原因及解决方法
2009-11-06 11:06:00