用ttcp快速同步 回首页

pkg_add -r ttcp
rehash

接收端:
mkdir -p /usr/local/apache2/htdocs;
cd /usr/local/apache2/htdocs;

cat << EOF > receive.sh
#!/bin/sh
ttcp -r | tar xf -
EOF

nohup sh ./receive.sh &

发送端:
cd /usr/local/apache2/htdocs

cat << EOF > send.sh
#!/bin/sh
tar cvf - a.b.c.dir | /usr/local/bin/ttcp -t \$1
EOF

nohup sh ./send.sh aaa.bbb.ccc.ddd.net &