#!/bin/bashSrc_Path=/data/www/logsDst_Path=/data/www/logs_bakfor rfile in `find $Src_Path/ -depth -maxdepth 1 -type f |awk -F '/' '{print $NF}'`dotar -zcPvf $Dst_Path/$rfile.tar.gz $Src_Path/$rfiledonefor dir in `find $Src_Path/* -type d|awk -F '/' '{print $NF}'`domkdir -p $Dst_Path/$dirfor file in `find $Src_Path/$dir/ -type f|awk -F '/' '{print $NF}'`dotar -zcPvf $Dst_Path/$dir/$file.tar.gz $Src_Path/$dir/$filedonedone