linux 定时备份文件夹
#!/bin/bash backupdir=yourbakdir time=`date +%Y%m%d` tar -zcvf $backupdir/myblog$time.tar your code dir find $backupdir -name "myblog*.tar" -type f -mtime +5 -exec rm {} \; > /dev/null 2>&1
linux 定时备份文件夹
#!/bin/bash backupdir=yourbakdir time=`date +%Y%m%d` tar -zcvf $backupdir/myblog$time.tar your code dir find $backupdir -name "myblog*.tar" -type f -mtime +5 -exec rm {} \; > /dev/null 2>&1