ssh 遠程刪除,scp遠程拷貝

ssh 遠程刪除緩存

expect -c "
spawn ssh -t user@IP rm -fr ~/daily_binary/dailybuildapks/*
expect {
\"*assword\" {set timeout 300; send \"password\r\";}
\"yes/no\" {send \"yes\r\"; exp_continue;}
}
expect eof"

scp 遠程拷貝ssh

expect -c "
spawn scp -r /home/jenkins/ user@192.168.0.188:~/daily_binary/dailybuildapks/
expect {
\"*assword\" {set timeout 300; send \"password\r\";}
\"yes/no\" {send \"yes\r\"; exp_continue;}
}
expect eof"

rsync 遠程同步 gradle

rsync --progress -e 'ssh -p 28866' -av --exclude=jobs --exclude=workspace jenkins@10.0.11.68:/home/jenkins/.jenkins/ ./
rsync -av -e "ssh -p 1115" --exclude=".gradle/caches" ./.gradle jenkins@10.192.39.86:/home/jenkins/ 掛載緩存
相關文章
相關標籤/搜索