-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathtoserver.sh
34 lines (30 loc) · 1.77 KB
/
toserver.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# ./toserver.sh room@15123 pc_RealIRM_RelativeLossAFD500
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Need a destination."
exit -1
fi
site=${1#*@}
user=${1%@*}
rm _data _log -rf
rm *__pycache__* -rf
rm */__pycache__* -rf
# mv exp ../
# # scp -r -P 15044 ./* [email protected]:~/lhf/work/irm_test/extract_tfrecord
# scp -r -P 15043 ./* [email protected]:~/work/speech_en_test/c001_se
# mv ../exp ./
if [ "$site" == "p40" ]; then
echo "To $user@$site:/home/zhangwenbo5/lihongfeng/$2"
rsync -avh -e "ssh -p 22 -o ProxyCommand='ssh -p 8695 [email protected] -W %h:%p'" --exclude-from='.gitignore' ./* zhangwenbo5@ksai-P40-2:/home/zhangwenbo5/lihongfeng/$2
elif [ "$site" == "v100-3" ]; then
echo "To $user@$site:/home/zhangwenbo5/lihongfeng/$2"
rsync -avh -e "ssh -p 22 -o ProxyCommand='ssh -p 8695 [email protected] -W %h:%p'" --exclude-from='.gitignore' ./* zhangwenbo5@ksai-v100-3:/home/zhangwenbo5/lihongfeng/$2
elif [ "$site" == "15123" ] || [ "$site" == "15041" ] || [ "$site" == "15043" ]; then
echo "To $user@$site:~/worklhf/$2"
rsync -avh -e 'ssh -p '$site --exclude-from='.gitignore' ./* [email protected]:~/worklhf/$2
fi
# -a :递归到目录,即复制所有文件和子目录。另外,打开归档模式和所有其他选项(相当于 -rlptgoD)
# -v :详细输出
# -e ssh :使用 ssh 作为远程 shell,这样所有的东西都被加密
# --exclude='*.out' :排除匹配模式的文件,例如 *.out 或 *.c 等。
# scp -r -P 15043 [email protected]:/home/xx/work/paper_se_test/pc001_se/exp/rnn_speech_enhancement/nnet_C001/nnet_iter15* ./
# scp -P 15223 [email protected]:/fast/worklhf/paper_se_test/C_UNIGRU_RealPSM_RelativeLossAFD100/exp/rnn_speech_enhancement/nnet_C_UNIGRU_RealPSM_RelativeLossAFD100/nnet_iter25* ./