#!/bin/csh
echo "Input dir_1"
echo ""
echo "/usr/local/abin"
echo ""
echo "/var/video/@top-souko"
echo ""
echo "/var/video/CD-MOTO2"
echo ""
echo "/var/video/@BACUP"
echo ""
echo "/var/video/@DOCUMENT"
echo ""
#
set dir_1 = $<
echo "------------------------------------------"
#
#現在位置
#
set PWD_1=`pwd`
#
cd dir_1
cd ../
#
#配下ディレクトリー設定
#
set PWD_2=`pwd`
echo ""
echo "$PWD_2/"
#
#実行ディレクトリーへ戻る
#
cd $PWD_1
echo ""
#ls
echo "------------------------------------------"
echo "192.168.11.3:$PWD_2/"
echo ""
echo "192.168.11.4:$PWD_2/"
echo ""
echo "Output dir_2"
echo ""
set dir_2 = $<
echo ""
echo "Start rsync...."
#rsync -arpt -v --delete $dir_1 $dir_2
/usr/bin/rsync -arpt -v --rsh="/usr/bin/sshpass -p "xxxxxx" ssh -o StrictHostKeyChecking=no -l root" $dir_1 $dir_2
— posted by くま at 11:23 am TrackBack [0]
Comments