5,710
edits
Changes
Home
,→rsync to transfer files to server
==== rsync push.sh ====
<pre>
#!/bin/bash
then
echo "usage: $0 [DIRECTORY]"
echo " or"
echo " $0 -n [DIRECTORY]"
exit
fi
if [ $1 = "-n" ]then cmd="rsync -n --delete -h -e ssh -avz --stats --progress $2 b393466@hanjin.dreamhost.com:~/$2"else cmd="rsync --delete -h -e ssh -avz --stats --progress $1 b393466@hanjin.dreamhost.com:~/$1"fi
echo $cmd
$cmd
</pre>