压缩文件备份

2015-03-27 0 472
压缩文件备份
#!/bin/sh

source=("../server" "../client")

target_dir="./"

date=$(date +%Y%m%d)

target="$target_dir$date.zip"

zip -qr $target ${source[0]} ${source[1]}

if [ $? = 0 ]
then
    echo "Back up SUCCESSFUL!"
else
    echo "Back up FAILED!"
fi

exit 0

遇见资源网 shell 压缩文件备份 http://www.ox520.com/16922.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务