多linux服务器之间实现文件自动复制
时间:2024-09-26 06:25:54 点击:205

  #!/usr/bin/expect

  set password 1234 #密码

  #download

  spawn scp /root/test.jar root@192.168.1.2:/usr/local/

  set timeout 300

  expect “192.168.1.2's password:“

  set timeout 3000

  #exec sleep 1

  send “$passwordr“

  set timeout 300

  send “exitr“

  #expect eof

  interact

  spawn scp /root/test.jar root@192.168.1.3:/usr/local/

  set timeout 300

  expect “root@192.168.1.3's password:“

  set timeout 3000

  #exec sleep 1

  send “$passwordr“

  set timeout 300

  send “exitr“

  interact

最新游戏更多

最新软件更多

  • 玩家推荐
  • 游戏攻略

北航游戏网 Copyright(C) 2008- 600435.cn All Rights Reserved!

苏ICP备17061231号| 免责声明