第一句子网 - 唯美句子、句子迷、好句子大全
第一句子网 > linux 打包压缩文件夹命令/压缩文件

linux 打包压缩文件夹命令/压缩文件

时间:2021-09-10 10:15:52

相关推荐

linux 打包压缩文件夹命令/压缩文件

一、打包压缩

例子:把文件夹打包压缩xx.zip文件,并指定放到/www/wwwroot//中

zip -r /www/wwwroot//xx.zip /www/wwwroot/

1.打包压缩文件夹

2.打包压缩成为xx.zip文件

3.打包的文件放到/www/wwwroot//下

1.1 打包文件路径

二、压缩

例子:把xx.zip文件解压到/www/wwwroot//100/中

unzip /www/wwwroot//xx.zip -d /www/wwwroot//100/

1.解压到/www/wwwroot//100/中

2.指定解压xx.zip文件

例子1:

打包压缩zip -r /www/wwwroot//xx.zip /

解压unzip /www/wwwroot//xx.zip -d /www/wwwroot//100/

例子2:(推荐)

1.先进根目录/www/wwwroot/

cd /www/wwwroot/

2.打包根目录/www/wwwroot/下文件夹,然后把打包文件xx.zip放到根目录/www/wwwroot/下

zip -r /www/wwwroot/xx.zip /

3.解压到根目录/www/wwwroot/下

unzip /www/wwwroot/xx.zip -d /www/wwwroot/

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。