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

tar、zip、gzip等解压缩命令

时间:2018-03-06 12:01:55      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:解压缩

tar命令:
压缩:tar cf 压缩后的文件名.tar.gz 压缩前的文件或者目录
解压:tar xf 压缩后的文件名.tar.gz
查看压缩里的内容:tar tf 压缩后的文件名.tar.gz

zip命令:
压缩目录:zip –r /opt/etc.zip /etc
解压:unzip /opt/etc.zip

gzip命令:
压缩:gzip -9v /opt/etc.zip (压缩后的文件为/opt/etc.zip.gz,不保留源文件)
解压:gunzip /opt/etc.zip.gz (解压后不保留源文件)
查看压缩里的内容:gzip -l /opt/etc.zip.gz

tar、zip、gzip等解压缩命令

标签:解压缩

原文地址:http://blog.51cto.com/liuzhengwei521/2083358

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