一、打包压缩
例子:把www.xx.com文件夹打包压缩xx.zip文件,并指定放到/www/wwwroot/www.xx.com/中
zip -r /www/wwwroot/www.xx.com/xx.zip /www/wwwroot/www.xx.com
1.打包压缩文件夹
2.打包压缩成为xx.zip文件
3.打包的文件放到/www/wwwroot/www.xx.com/下
1.1 打包文件路径
二、压缩
例子:把xx.zip文件解压到/www/wwwroot/www.xx.com/100/中
unzip /www/wwwroot/www.xx.com/xx.zip -d /www/wwwroot/www.xx.com/100/
1.解压到/www/wwwroot/www.xx.com/100/中
2.指定解压xx.zip文件
例子1:
打包压缩
zip -r /www/wwwroot/www.xx.com/xx.zip www.xx.com/
解压
unzip /www/wwwroot/www.xx.com/xx.zip -d /www/wwwroot/www.xx.com/100/
例子2:(推荐)
1.先进根目录/www/wwwroot/
cd /www/wwwroot/
2.打包根目录/www/wwwroot/下www.xx.com文件夹,然后把打包文件xx.zip放到根目录/www/wwwroot/下
zip -r /www/wwwroot/xx.zip www.xx.com/
3.解压到根目录/www/wwwroot/下
unzip /www/wwwroot/xx.zip -d /www/wwwroot/