Changes

Jump to: navigation, search

Home

171 bytes added, 19:05, 12 April 2011
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>

Navigation menu