#!/bin/bash inicio=`date +%d/%m/%y-%h:%m:%s` log=/var/log/sync/`date +%y-%m-%d`_sync-gaveta.txt echo echo echo echo
" " >> $log " " >> $log "|-----------------------------------------------" " sincronizacao iniciada em $inicio" >> $log
>> $log
sudo rsync -cravzp --delete-excluded /home/publica/ /sync/ >> $log final=`date +%d/%m/%y-%h%:m:%s` echo echo echo echo
" sincronizacao finalizada em $final" >> $log "|-----------------------------------------------" " " >> $log " " >> $log
>> $log