标签:blog 文件 ar div linux log python file
#!/bin/sh #Author: Opal TODAY=`date +%Y%m%d` YESTERDAY=`date -d"-1 day" +%Y%m%d` mkdir -p /var/backups/etc.${TODAY}/ cp -r /etc/* /var/backups/etc.${TODAY}/ DIFF=`diff -r /var/backups/etc.${TODAY}/ /var/backups/etc.${YESTERDAY}/` if [$DIFF = ""];then rm -rf /var/backups/etc.${YESTERDAY} else echo "Some file have changed!" fi
标签:blog 文件 ar div linux log python file
原文地址:http://www.cnblogs.com/opalyao/p/3906551.html