Qilan2 commited on
Commit
06772e1
·
verified ·
1 Parent(s): ed4e767

Update rsync.py

Browse files
Files changed (1) hide show
  1. rsync.py +4 -4
rsync.py CHANGED
@@ -1,16 +1,16 @@
1
  import pexpect
2
 
3
  # 定义变量
4
- local_path = "/a/"
5
  remote_user = "root"
6
  remote_host = "8.217.96.17"
7
- remote_port = "7074"
8
- remote_path = "/a/"
9
  password = "qilan"
10
 
11
  # 构建 rsync 命令
12
  command = f"rsync -avzP -e 'ssh -p {remote_port}' {local_path} {remote_user}@{remote_host}:{remote_path}"
13
-
14
  # 启动子进程并运行命令
15
  child = pexpect.spawn(command)
16
 
 
1
  import pexpect
2
 
3
  # 定义变量
4
+ local_path = "/sillytavern/"
5
  remote_user = "root"
6
  remote_host = "8.217.96.17"
7
+ remote_port = "7072"
8
+ remote_path = "/sillytavern/"
9
  password = "qilan"
10
 
11
  # 构建 rsync 命令
12
  command = f"rsync -avzP -e 'ssh -p {remote_port}' {local_path} {remote_user}@{remote_host}:{remote_path}"
13
+ print('rsync命令',command)
14
  # 启动子进程并运行命令
15
  child = pexpect.spawn(command)
16