#!/bin/bash
declare x=0
function check
{
for i in `ps -ef | grep rsync`
do
if [[ $i =~ "-vzrtP" ]]; then
x=1
fi
done
return $x
}
check
[[ $x -eq 0 ]]&&nohup rsync -vzrtP --exclude '*kb/' --exclude '*.m3u8' --exclude '*.jpg' -u [email protected]::small /home/www/media/videos/iphone/&
本文轉自 15816815732 51CTO部落格,原文連結:http://blog.51cto.com/68686789/1752683